From 229cc9a37891a90dd71b889e43a08abee04071c7 Mon Sep 17 00:00:00 2001 From: flowtron Date: Fri, 2 Jul 2010 17:49:57 +0000 Subject: [PATCH] fix arenamode pickups just before end-of-round locally (sanity check please) git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5266 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/clients2c.cpp | 1 + source/src/entities.cpp | 4 ++-- source/src/protos.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/src/clients2c.cpp b/source/src/clients2c.cpp index 38fad4a9..a90ec710 100644 --- a/source/src/clients2c.cpp +++ b/source/src/clients2c.cpp @@ -551,6 +551,7 @@ void parsemessages(int cn, playerent *d, ucharbuf &p) arenaintermission = 0; if(m_arena && !localwrongmap) { + spawnallitems(true); // fix any items picked up just before end of last round closemenu(NULL); conoutf(_("new round starting... fight!")); hudeditf(HUDMSG_TIMER, "FIGHT!"); diff --git a/source/src/entities.cpp b/source/src/entities.cpp index 0c52e2c7..e40acdd2 100644 --- a/source/src/entities.cpp +++ b/source/src/entities.cpp @@ -285,12 +285,12 @@ void checkitems(playerent *d) } } -void spawnallitems() // spawns items locally +void spawnallitems(bool is_arena) // spawns items locally { loopv(ents) if(ents[i].fitsmode(gamemode) || (multiplayer(false) && gamespeed!=100 && (i=-1))) { ents[i].spawned = true; - ents[i].twice = false; + if(!is_arena) ents[i].twice = false; ents[i].lastmillis = lastmillis; } } diff --git a/source/src/protos.h b/source/src/protos.h index 5d13c747..559b0bed 100644 --- a/source/src/protos.h +++ b/source/src/protos.h @@ -644,7 +644,7 @@ extern void checkakimbo(); extern struct projectile *newprojectile(vec &from, vec &to, float speed, bool local, playerent *owner, int gun, int id = lastmillis); // entities -extern void spawnallitems(); +extern void spawnallitems(bool is_arena = false); extern void pickupeffects(int n, playerent *d); extern void renderentities(); extern void rendermapmodels();