| 245 | } |
| 246 | |
| 247 | void CALifeSimulator__release(CALifeSimulator* self, CSE_Abstract* object, bool) |
| 248 | { |
| 249 | VERIFY(self); |
| 250 | // self->release (object,true); |
| 251 | |
| 252 | R_ASSERT(object); |
| 253 | CSE_ALifeObject* alife_object = smart_cast<CSE_ALifeObject*>(object); |
| 254 | THROW(alife_object); |
| 255 | if (!alife_object->m_bOnline) |
| 256 | { |
| 257 | self->release(object, true); |
| 258 | return; |
| 259 | } |
| 260 | |
| 261 | CGameObject* pGameObject = smart_cast<CGameObject*>(Level().Objects.net_Find(alife_object->ID)); |
| 262 | if (pGameObject) |
| 263 | { |
| 264 | pGameObject->DestroyObject(); |
| 265 | } |
| 266 | else |
| 267 | { |
| 268 | // awful hack, for stohe only |
| 269 | NET_Packet packet; |
| 270 | packet.w_begin(M_EVENT); |
| 271 | packet.w_u32(Level().timeServer()); |
| 272 | packet.w_u16(GE_DESTROY); |
| 273 | packet.w_u16(object->ID); |
| 274 | Level().Send(packet, net_flags(TRUE, TRUE)); |
| 275 | } |
| 276 | } |
| 277 | |
| 278 | void CALifeSimulator__assign_story_id(CALifeSimulator* self, ALife::_OBJECT_ID _id, ALife::_STORY_ID _story_id) |
| 279 | { |