diff --git a/source/src/entity.h b/source/src/entity.h index 31d4b879..6a3e9c61 100644 --- a/source/src/entity.h +++ b/source/src/entity.h @@ -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); } diff --git a/source/src/server.cpp b/source/src/server.cpp index 07879d66..9ffb1fe9 100644 --- a/source/src/server.cpp +++ b/source/src/server.cpp @@ -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); } diff --git a/source/src/serveractions.h b/source/src/serveractions.h index 7577c528..80b11ce2 100644 --- a/source/src/serveractions.h +++ b/source/src/serveractions.h @@ -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(); }