|
From: <bul...@us...> - 2013-05-27 19:00:03
|
Revision: 22772
http://sourceforge.net/p/bzflag/code/22772
Author: bullet_catcher
Date: 2013-05-27 19:00:01 +0000 (Mon, 27 May 2013)
Log Message:
-----------
Make a disposable copy of a FlagType object to preserve the const original when firing a world weapon.
Modified Paths:
--------------
trunk/bzflag/src/bzfs/WorldWeapons.cxx
Modified: trunk/bzflag/src/bzfs/WorldWeapons.cxx
===================================================================
--- trunk/bzflag/src/bzfs/WorldWeapons.cxx 2013-05-27 02:04:17 UTC (rev 22771)
+++ trunk/bzflag/src/bzfs/WorldWeapons.cxx 2013-05-27 19:00:01 UTC (rev 22772)
@@ -158,8 +158,9 @@
it != weapons.end(); ++it) {
Weapon *w = *it;
if (w->nextTime <= nowTime) {
+ FlagType type = *(w->type); // non-const copy
- fireWorldWepReal((FlagType*)w->type, BZDB.eval(StateDatabase::BZDB_RELOADTIME),
+ fireWorldWepReal(&type, BZDB.eval(StateDatabase::BZDB_RELOADTIME),
ServerPlayer, w->teamColor, w->origin, w->tilt, w->direction,
getNewWorldShotID(), 0);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|