|
38 | 38 | #include "sound_player.h" |
39 | 39 | #include "stalker_decision_space.h" |
40 | 40 | #include "space_restriction_manager.h" |
| 41 | +//Alundaio |
| 42 | +#include "Artefact.h" |
| 43 | +#include "holder_custom.h" |
| 44 | +#include "Actor.h" |
| 45 | +//-Alundaio |
41 | 46 |
|
42 | 47 | namespace MemorySpace |
43 | 48 | { |
@@ -924,6 +929,7 @@ float CScriptGameObject::GetAnomalyPower() |
924 | 929 | THROW(zone); |
925 | 930 | return zone->GetMaxPower(); |
926 | 931 | } |
| 932 | + |
927 | 933 | void CScriptGameObject::SetAnomalyPower(float p) |
928 | 934 | { |
929 | 935 | CCustomZone* zone = smart_cast<CCustomZone*>(&object()); |
@@ -1214,3 +1220,115 @@ bool CScriptGameObject::is_weapon_going_to_be_strapped(CScriptGameObject const* |
1214 | 1220 |
|
1215 | 1221 | return stalker->is_weapon_going_to_be_strapped(&object->object()); |
1216 | 1222 | } |
| 1223 | + |
| 1224 | +//Alundaio: Taken from Radium |
| 1225 | +float CScriptGameObject::GetArtefactHealthRestoreSpeed() |
| 1226 | +{ |
| 1227 | + CArtefact* artefact = smart_cast<CArtefact*>(&object()); |
| 1228 | + THROW(artefact); |
| 1229 | + |
| 1230 | + return artefact->GetHealthPower(); |
| 1231 | +} |
| 1232 | + |
| 1233 | +float CScriptGameObject::GetArtefactRadiationRestoreSpeed() |
| 1234 | +{ |
| 1235 | + CArtefact* artefact = smart_cast<CArtefact*>(&object()); |
| 1236 | + THROW(artefact); |
| 1237 | + |
| 1238 | + return artefact->GetRadiationPower(); |
| 1239 | +} |
| 1240 | + |
| 1241 | +float CScriptGameObject::GetArtefactSatietyRestoreSpeed() |
| 1242 | +{ |
| 1243 | + CArtefact* artefact = smart_cast<CArtefact*>(&object()); |
| 1244 | + THROW(artefact); |
| 1245 | + |
| 1246 | + return artefact->GetSatietyPower(); |
| 1247 | +} |
| 1248 | + |
| 1249 | +float CScriptGameObject::GetArtefactPowerRestoreSpeed() |
| 1250 | +{ |
| 1251 | + CArtefact* artefact = smart_cast<CArtefact*>(&object()); |
| 1252 | + THROW(artefact); |
| 1253 | + |
| 1254 | + return artefact->GetPowerPower(); |
| 1255 | +} |
| 1256 | + |
| 1257 | +float CScriptGameObject::GetArtefactBleedingRestoreSpeed() |
| 1258 | +{ |
| 1259 | + CArtefact* artefact = smart_cast<CArtefact*>(&object()); |
| 1260 | + THROW(artefact); |
| 1261 | + |
| 1262 | + return artefact->GetBleedingPower(); |
| 1263 | +} |
| 1264 | + |
| 1265 | +void CScriptGameObject::SetArtefactHealthRestoreSpeed(float value) |
| 1266 | +{ |
| 1267 | + CArtefact* artefact = smart_cast<CArtefact*>(&object()); |
| 1268 | + THROW(artefact); |
| 1269 | + |
| 1270 | + artefact->SetHealthPower(value); |
| 1271 | +} |
| 1272 | + |
| 1273 | +void CScriptGameObject::SetArtefactRadiationRestoreSpeed(float value) |
| 1274 | +{ |
| 1275 | + CArtefact* artefact = smart_cast<CArtefact*>(&object()); |
| 1276 | + THROW(artefact); |
| 1277 | + |
| 1278 | + artefact->SetRadiationPower(value); |
| 1279 | +} |
| 1280 | + |
| 1281 | +void CScriptGameObject::SetArtefactSatietyRestoreSpeed(float value) |
| 1282 | +{ |
| 1283 | + CArtefact* artefact = smart_cast<CArtefact*>(&object()); |
| 1284 | + THROW(artefact); |
| 1285 | + |
| 1286 | + artefact->SetSatietyPower(value); |
| 1287 | +} |
| 1288 | + |
| 1289 | +void CScriptGameObject::SetArtefactPowerRestoreSpeed(float value) |
| 1290 | +{ |
| 1291 | + CArtefact* artefact = smart_cast<CArtefact*>(&object()); |
| 1292 | + THROW(artefact); |
| 1293 | + |
| 1294 | + artefact->SetPowerPower(value); |
| 1295 | +} |
| 1296 | + |
| 1297 | +void CScriptGameObject::SetArtefactBleedingRestoreSpeed(float value) |
| 1298 | +{ |
| 1299 | + CArtefact* artefact = smart_cast<CArtefact*>(&object()); |
| 1300 | + THROW(artefact); |
| 1301 | + |
| 1302 | + artefact->SetBleedingPower(value); |
| 1303 | +} |
| 1304 | + |
| 1305 | +//Alundaio |
| 1306 | +void CScriptGameObject::AttachVehicle(CScriptGameObject* veh) |
| 1307 | +{ |
| 1308 | + CActor *actor = smart_cast<CActor*>(&object()); |
| 1309 | + if (actor) |
| 1310 | + { |
| 1311 | + CHolderCustom* vehicle = smart_cast<CHolderCustom*>(veh); |
| 1312 | + if (vehicle) |
| 1313 | + actor->attach_Vehicle(vehicle); |
| 1314 | + } |
| 1315 | +} |
| 1316 | + |
| 1317 | +void CScriptGameObject::DetachVehicle() |
| 1318 | +{ |
| 1319 | + CActor *actor = smart_cast<CActor*>(&object()); |
| 1320 | + if (actor) |
| 1321 | + actor->detach_Vehicle(); |
| 1322 | +} |
| 1323 | + |
| 1324 | +void CScriptGameObject::ForceSetPosition(Fvector3 pos) |
| 1325 | +{ |
| 1326 | + CPhysicsShellHolder* P = smart_cast<CPhysicsShellHolder*>(this); |
| 1327 | + if (!P) |
| 1328 | + return; |
| 1329 | + |
| 1330 | + Fmatrix M = P->XFORM(); |
| 1331 | + M.translate(pos); |
| 1332 | + P->ForceTransform(M); |
| 1333 | +} |
| 1334 | +//-Alundaio |
0 commit comments