Update: fixed! Do not add RTSUnits to MissionCleanup SimGroup
by Stephen Zepp · in RTS Starter Kit · 11/21/2004 (11:13 am) · 2 replies
Priority: Low
Category: Improper functionality in all configurations
Reproducable: Yes
Summary: In /server/scripts/items/building.cs, at the bottom of the function serverCmdPlaceBuilding. we call MissionCleanup.add(%b);. Unfortunately, since both MissionCleanup and (%client).buildings are SimGroups (and an object may only be the member of one SimGroup), SimGroup::addObject() (simBase.cc line 1353) silently removes the object to be added from any previous groups.
In any case, we do not need to add this to the MissionCleanup group, since we handle cleaning up (%clientId.buildings) ourselves.
Fix: remove the line "MissionCleanup.add(%b);" from the bottom of the function serverCmdPlaceBuilding in /server/scripts/items/building.cs.
Category: Improper functionality in all configurations
Reproducable: Yes
Summary: In /server/scripts/items/building.cs, at the bottom of the function serverCmdPlaceBuilding. we call MissionCleanup.add(%b);. Unfortunately, since both MissionCleanup and (%client).buildings are SimGroups (and an object may only be the member of one SimGroup), SimGroup::addObject() (simBase.cc line 1353) silently removes the object to be added from any previous groups.
In any case, we do not need to add this to the MissionCleanup group, since we handle cleaning up (%clientId.buildings) ourselves.
Fix: remove the line "MissionCleanup.add(%b);" from the bottom of the function serverCmdPlaceBuilding in /server/scripts/items/building.cs.
#2
11/21/2004 (12:19 pm)
@Ben: It's a one-liner, just need to remove the line. It's damn hard to troubleshoot however if you happen to not know/forget that SimObjects can only be in one SimGroup.
Associate Kyle Carter