global ban time switch, and fix previous weapon in camera mode (related to nades).

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5773 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Rafael Barreto
2010-10-19 18:50:44 +00:00
parent 464373103e
commit 10d1cefd05
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -482,7 +482,7 @@ public:
curskin = nextskin[team_base(team)];
}
void selectweapon(int w) { prevweaponsel = weaponsel = weapons[(gunselect = w)]; }
void selectweapon(int w) { if (weaponsel) prevweaponsel = weaponsel; weaponsel = weapons[(gunselect = w)]; if (!prevweaponsel) prevweaponsel = weaponsel; }
void setprimary(int w) { primweap = weapons[(primary = w)]; }
void setnextprimary(int w) { nextprimweap = weapons[(nextprimary = w)]; }
bool isspectating() { return state==CS_SPECTATE || (state==CS_DEAD && spectatemode > SM_NONE); }
+1 -1
View File
@@ -1363,7 +1363,7 @@ void serverdamage(client *target, client *actor, int damage, int gun, bool gib,
actor->state.teamkills * 30 * 1000 > gamemillis &&
actor->state.frags < 4 * actor->state.teamkills ) )
{
ban b = { actor->peer->address, servmillis+20*60*1000 };
ban b = { actor->peer->address, servmillis+scl.ban_time };
bans.add(b);
disconnect_client(actor->clientnum, DISC_AUTOBAN);
}
+2 -2
View File
@@ -181,8 +181,8 @@ struct banaction : playeraction
bool wasvalid;
void perform()
{
ban b = { address, servmillis+20*60*1000 };
bans.add(b);
ban b = { address, servmillis+scl.ban_time };
bans.add(b);
disconnect(DISC_MBAN);
}
virtual bool isvalid() { return wasvalid || playeraction::isvalid(); }