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/view.cpp

    r124 r126  
    264264  if (local_player())
    265265    sbar.associate(this);
     266  set_tint(number);
     267  set_team(-1);
    266268  sbar.need_refresh();
    267269}
     
    860862      focus->x=start->x;
    861863      focus->y=start->y;
    862       dprintf("reset position to %d %d\n",start->x,start->y);
     864      dprintf("reset player position to %d %d\n",start->x,start->y);
    863865    }
    864866    focus->set_state(stopped);
     867    focus->set_tint(_tint);
     868    focus->set_team(_team);
    865869    memset(weapons,0xff,total_weapons*sizeof(int32_t));
    866870    memset(last_weapons,0xff,total_weapons*sizeof(int32_t));
     
    12531257  } while (cmd!=SCMD_END_OF_PACKET);
    12541258}
     1259
     1260void view::set_tint(int tint)
     1261{
     1262    if(tint < 0)
     1263        tint = 0;
     1264    _tint = tint;
     1265    focus->set_tint(tint);
     1266}
     1267
     1268int view::get_tint()
     1269{
     1270    return _tint;
     1271}
     1272
     1273void view::set_team(int team)
     1274{
     1275    if(team < 0)
     1276        team = 0;
     1277    _team = team;
     1278    focus->set_team(team);
     1279}
     1280
     1281int view::get_team()
     1282{
     1283    return _team;
     1284}
     1285
Note: See TracChangeset for help on using the changeset viewer.