| 158 | } |
| 159 | |
| 160 | BOOL CCar::net_Spawn(CSE_Abstract* DC) |
| 161 | { |
| 162 | #ifdef DEBUG |
| 163 | InitDebug(); |
| 164 | #endif |
| 165 | CSE_Abstract* e = (CSE_Abstract*)(DC); |
| 166 | CSE_ALifeCar* co = smart_cast<CSE_ALifeCar*>(e); |
| 167 | BOOL R = inherited::net_Spawn(DC); |
| 168 | |
| 169 | PKinematics(Visual())->CalculateBones_Invalidate(); |
| 170 | PKinematics(Visual())->CalculateBones(); |
| 171 | |
| 172 | CPHSkeleton::Spawn(e); |
| 173 | setEnabled(TRUE); |
| 174 | setVisible(TRUE); |
| 175 | PKinematics(Visual())->CalculateBones_Invalidate(); |
| 176 | PKinematics(Visual())->CalculateBones(); |
| 177 | m_fSaveMaxRPM = m_max_rpm; |
| 178 | SetfHealth(co->health); |
| 179 | |
| 180 | if (!g_Alive()) |
| 181 | b_exploded = true; |
| 182 | else |
| 183 | b_exploded = false; |
| 184 | |
| 185 | CDamagableItem::RestoreEffect(); |
| 186 | |
| 187 | CInifile* pUserData = PKinematics(Visual())->LL_UserData(); |
| 188 | if (pUserData->section_exist("destroyed")) |
| 189 | CPHDestroyable::Load(pUserData, "destroyed"); |
| 190 | if (pUserData->section_exist("mounted_weapon_definition")) |
| 191 | m_car_weapon = xr_new<CCarWeapon>(this); |
| 192 | |
| 193 | if (pUserData->section_exist("visual_memory_definition")) |
| 194 | { |
| 195 | m_memory = xr_new<car_memory>(this); |
| 196 | m_memory->reload(pUserData->r_string("visual_memory_definition", "section")); |
| 197 | } |
| 198 | |
| 199 | renderable.visual->ignore_optimization = true; |
| 200 | |
| 201 | return (CScriptEntity::net_Spawn(DC) && R); |
| 202 | } |
| 203 | |
| 204 | void CCar::ActorObstacleCallback(bool& do_colide, bool bo1, dContact& c, SGameMtl* material_1, SGameMtl* material_2) |
| 205 | { |
no test coverage detected