Ignore:
Timestamp:
Mar 18, 2008, 11:22:51 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • Implement game_object::set_tint, get_tint, set_team and get_team, as well as the corresponding set_object_tint, get_object_tint, set_object_team and get_object_team LISP functions. They'll be useful for CTF mode.

Inspired by Abuse Win32 changelog from February 18, 2001:

  • Changed lisp function (set_player_color x) to

(set_object_tint x)

  • Added lisp function (get_object_tint)

Inspired by Abuse Win32 changelog from February 17, 2001:

  • Added lisp function (set_player_color x) to switch player

to color number x
see chat.lsp for details

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/cop.cpp

    r124 r126  
    755755      p_ref r1(ret);
    756756
    757       push_onto_list(new_lisp_number(bot->controller()->player_number),ret);
     757      push_onto_list(new_lisp_number(bot->get_tint()),ret);
    758758
    759759      if (bot->lvars[special_power]==SNEAKY_POWER)
    760760      {
    761761    if (bot->lvars[used_special_power]==0)
    762       player_draw(top_just_fired,bot->controller()->player_number);
     762      player_draw(top_just_fired,bot->get_tint());
    763763    else if (bot->lvars[used_special_power]<15)
    764764      o->draw_trans(bot->lvars[used_special_power],16);
     
    818818    {
    819819      case NO_POWER :
    820       { player_draw(just_fired,o->controller()->player_number); } break;
     820      { player_draw(just_fired,o->get_tint()); } break;
    821821
    822822      case HEALTH_POWER :
    823823      {
    824     player_draw(just_fired,o->controller()->player_number);
     824    player_draw(just_fired,o->get_tint());
    825825    if (o->controller() && o->controller()->local_player())
    826826      cache.img(S_health_image)->put_image(screen,o->controller()->cx2-20,
     
    842842    }
    843843
    844     player_draw(just_fired,o->controller()->player_number);
     844    player_draw(just_fired,o->get_tint());
    845845    o->state=(character_state)old_state;
    846846    if (o->controller() && o->controller()->local_player())
     
    862862    }
    863863
    864     player_draw(just_fired,o->controller()->player_number);
     864    player_draw(just_fired,o->get_tint());
    865865    o->state=(character_state)old_state;
    866866
     
    872872      {
    873873    if (o->lvars[used_special_power]==0)
    874       player_draw(just_fired,o->controller()->player_number);
     874      player_draw(just_fired,o->get_tint());
    875875    else if (o->lvars[used_special_power]<15)
    876876      o->draw_trans(o->lvars[used_special_power],16);
     
    10211021    for (i=0;i<tp;i++)
    10221022    {
    1023       int color=lnumber_value(lget_array_element(symbol_value(l_player_text_color),sorted_players[i]->player_number));
     1023      int color=lnumber_value(lget_array_element(symbol_value(l_player_text_color),sorted_players[i]->get_tint()));
    10241024      sprintf(msg,"%3ld %s",(long)sorted_players[i]->kills,sorted_players[i]->name);
    10251025      if (sorted_players[i]==local)
     
    10621062  {
    10631063    enum { NAME_LEN=18 } ;
    1064     int color=lnumber_value(lget_array_element(symbol_value(l_player_text_color),v->player_number));
     1064    int color=lnumber_value(lget_array_element(symbol_value(l_player_text_color),v->get_tint()));
    10651065    char max_name[NAME_LEN];
    10661066    strncpy(max_name,v->name,NAME_LEN-1);
Note: See TracChangeset for help on using the changeset viewer.