diff --git a/TR5Main/Game/lot.cpp b/TR5Main/Game/lot.cpp index 08de35744..763798ae3 100644 --- a/TR5Main/Game/lot.cpp +++ b/TR5Main/Game/lot.cpp @@ -188,15 +188,22 @@ void InitialiseSlot(short itemNum, short slot) // Can swim creature->LOT.step = SECTOR(20); creature->LOT.drop = -SECTOR(20); + if (item->objectNumber == ID_CROCODILE) { - creature->LOT.fly = DEFAULT_SWIM_UPDOWN_SPEED / 2; // crocodile is more slower (up/down) than the other creature when swimming. + creature->LOT.fly = DEFAULT_SWIM_UPDOWN_SPEED / 2; // is more slow than the other underwater entity creature->LOT.isAmphibious = true; // crocodile can walk and swim. } + else if (item->objectNumber == ID_BIG_RAT) + { + creature->LOT.fly = NO_FLYING; // dont want the bigrat to be able to go in water (just the surface !) + creature->LOT.isAmphibious = true; // bigrat can walk and swim. + } else { creature->LOT.fly = DEFAULT_SWIM_UPDOWN_SPEED; } + creature->LOT.zone = ZONE_WATER; break; diff --git a/TR5Main/Objects/TR1/Entity/tr1_bigrat.cpp b/TR5Main/Objects/TR1/Entity/tr1_bigrat.cpp new file mode 100644 index 000000000..d54277821 --- /dev/null +++ b/TR5Main/Objects/TR1/Entity/tr1_bigrat.cpp @@ -0,0 +1,14 @@ +#include "framework.h" +#include "tr1_bigrat.h" + +// initialised at loading level +void InitialiseBigRat(short itemNumber) +{ + +} + +// when triggered ! +void BigRatControl(short itemNumber) +{ + +} \ No newline at end of file diff --git a/TR5Main/Objects/TR1/Entity/tr1_bigrat.h b/TR5Main/Objects/TR1/Entity/tr1_bigrat.h new file mode 100644 index 000000000..a439cfff9 --- /dev/null +++ b/TR5Main/Objects/TR1/Entity/tr1_bigrat.h @@ -0,0 +1,4 @@ +#pragma once + +void InitialiseBigRat(short itemNumber); +void BigRatControl(short itemNumber); \ No newline at end of file diff --git a/TR5Main/Objects/TR1/tr1_objects.cpp b/TR5Main/Objects/TR1/tr1_objects.cpp index 3bdf8dfab..f7f075180 100644 --- a/TR5Main/Objects/TR1/tr1_objects.cpp +++ b/TR5Main/Objects/TR1/tr1_objects.cpp @@ -7,6 +7,7 @@ #include "tr1_natla.h" // OK #include "tr1_natla_mutant.h" // OK #include "tr1_wolf.h" // OK +#include "tr1_bigrat.h" // OK /// objects /// traps @@ -74,6 +75,26 @@ static void StartBaddy(ObjectInfo* obj) obj->zoneType = ZONE_APE; } + obj = &Objects[ID_BIG_RAT]; + if (obj->loaded) + { + obj->initialise = InitialiseBigRat; + obj->control = BigRatControl; + obj->collision = CreatureCollision; + obj->shadowSize = UNIT_SHADOW / 2; + obj->hitPoints = 5; + obj->pivotLength = 200; + obj->radius = 204; + obj->intelligent = true; + obj->savePosition = true; + obj->saveHitpoints = true; + obj->saveAnim = true; + obj->saveFlags = true; + obj->waterCreature = true; // dont want the rat to be killed when going in water ! + obj->zoneType = ZONE_WATER; + Bones[obj->boneIndex + 4] |= ROT_Y; + } + obj = &Objects[ID_NATLA]; if (obj->loaded) { diff --git a/TR5Main/Game/objectslist.h b/TR5Main/Objects/objectslist.h similarity index 99% rename from TR5Main/Game/objectslist.h rename to TR5Main/Objects/objectslist.h index d900b0252..8780173cf 100644 --- a/TR5Main/Game/objectslist.h +++ b/TR5Main/Objects/objectslist.h @@ -83,7 +83,8 @@ typedef enum GAME_OBJECT_ID ID_WHALE, ID_SMALL_DINOSAUR, // TR3 - 34 ID_FISH_EMITTER, // TR3 - 338 - OK - Needs testing and drawing - ID_RAT, + ID_RAT, // TR2 - TR3 - OK + ID_BIG_RAT, // TR1 - (Land And Water) ID_CROCODILE, ID_BAT, ID_SPHINX, diff --git a/TR5Main/Scripting/GameLogicScript.cpp b/TR5Main/Scripting/GameLogicScript.cpp index d2970856d..c2afbedb7 100644 --- a/TR5Main/Scripting/GameLogicScript.cpp +++ b/TR5Main/Scripting/GameLogicScript.cpp @@ -95,6 +95,7 @@ GameScript::GameScript(sol::state* lua) {"SMALL_DINOSAUR", ID_SMALL_DINOSAUR}, {"FISH_EMITTER", ID_FISH_EMITTER}, {"RAT", ID_RAT}, + {"BIG_RAT", ID_BIG_RAT}, {"CROCODILE", ID_CROCODILE}, {"BAT", ID_BAT}, {"SPHINX", ID_SPHINX}, @@ -194,6 +195,7 @@ GameScript::GameScript(sol::state* lua) {"MUTANT2", ID_MUTANT2}, {"LIZARD", ID_LIZARD}, {"TONY_BOSS", ID_TONY_BOSS}, + {"TONY_BOSS_FLAME", ID_TONY_BOSS_FLAME}, {"PUNA_BOSS", ID_PUNA_BOSS}, {"SOPHIA_LEE_BOSS", ID_SOPHIA_LEE_BOSS}, {"LASER_BOLT", ID_LASER_BOLT}, @@ -232,6 +234,9 @@ GameScript::GameScript(sol::state* lua) {"ROMAN_GOD1", ID_ROMAN_GOD1}, {"ROMAN_GOD2", ID_ROMAN_GOD2}, {"LAGOON_WITCH", ID_LAGOON_WITCH}, + {"BOSS_SHIELD", ID_BOSS_SHIELD}, + {"BOSS_EXPLOSION_SHOCKWAVE", ID_BOSS_EXPLOSION_SHOCKWAVE}, + {"BOSS_EXPLOSION_RING", ID_BOSS_EXPLOSION_RING}, {"SPRINGBOARD", ID_SPRINGBOARD}, {"ROLLING_SPINDLE", ID_ROLLING_SPINDLE}, {"DISK_SHOOTER", ID_DISK_SHOOTER}, diff --git a/TR5Main/TR5Main.vcxproj b/TR5Main/TR5Main.vcxproj index 856bdbe8f..b15b54db1 100644 --- a/TR5Main/TR5Main.vcxproj +++ b/TR5Main/TR5Main.vcxproj @@ -149,6 +149,7 @@ xcopy /Y "$(ProjectDir)Scripting\Scripts\*.lua" "$(TargetDir)\Scripts" + @@ -365,7 +366,7 @@ xcopy /Y "$(ProjectDir)Scripting\Scripts\*.lua" "$(TargetDir)\Scripts" - + @@ -390,6 +391,7 @@ xcopy /Y "$(ProjectDir)Scripting\Scripts\*.lua" "$(TargetDir)\Scripts" + diff --git a/TR5Main/TR5Main.vcxproj.filters b/TR5Main/TR5Main.vcxproj.filters index 8da724036..08f264967 100644 --- a/TR5Main/TR5Main.vcxproj.filters +++ b/TR5Main/TR5Main.vcxproj.filters @@ -726,9 +726,6 @@ File di intestazione - - File di intestazione - File di intestazione @@ -777,6 +774,12 @@ File di intestazione + + File di intestazione + + + File di intestazione + @@ -1421,6 +1424,9 @@ File di origine + + File di origine +