mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-06 19:01:06 +03:00
Implemented Big Rat (TR1) Template
- Fixed old object (added by me) missing from the lua script.
This commit is contained in:
parent
dd69b5c53b
commit
977e338eb7
8 changed files with 66 additions and 6 deletions
|
@ -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;
|
||||
|
||||
|
|
14
TR5Main/Objects/TR1/Entity/tr1_bigrat.cpp
Normal file
14
TR5Main/Objects/TR1/Entity/tr1_bigrat.cpp
Normal file
|
@ -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)
|
||||
{
|
||||
|
||||
}
|
4
TR5Main/Objects/TR1/Entity/tr1_bigrat.h
Normal file
4
TR5Main/Objects/TR1/Entity/tr1_bigrat.h
Normal file
|
@ -0,0 +1,4 @@
|
|||
#pragma once
|
||||
|
||||
void InitialiseBigRat(short itemNumber);
|
||||
void BigRatControl(short itemNumber);
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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,
|
|
@ -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},
|
||||
|
|
|
@ -149,6 +149,7 @@ xcopy /Y "$(ProjectDir)Scripting\Scripts\*.lua" "$(TargetDir)\Scripts"</Command>
|
|||
<ClInclude Include="Libs\zlib\zlib.h" />
|
||||
<ClInclude Include="Objects\Effects\tr4_bubbles.h" />
|
||||
<ClInclude Include="Objects\Effects\tr5_electricity.h" />
|
||||
<ClInclude Include="Objects\TR1\Entity\tr1_bigrat.h" />
|
||||
<ClInclude Include="Objects\TR4\Entity\tr4_baboon.h" />
|
||||
<ClInclude Include="Objects\TR4\Object\tr4_laradouble.h" />
|
||||
<ClInclude Include="Objects\TR4\Object\tr4_sarcophagus.h" />
|
||||
|
@ -365,7 +366,7 @@ xcopy /Y "$(ProjectDir)Scripting\Scripts\*.lua" "$(TargetDir)\Scripts"</Command>
|
|||
<ClInclude Include="CustomObjects\tiger.h" />
|
||||
<ClInclude Include="Game\tomb4fx.h" />
|
||||
<ClInclude Include="Game\traps.h" />
|
||||
<ClInclude Include="Game\objectslist.h" />
|
||||
<ClInclude Include="Objects\objectslist.h" />
|
||||
<ClInclude Include="Game\malloc.h" />
|
||||
<ClInclude Include="Game\trmath.h" />
|
||||
<ClInclude Include="Scripting\GameLogicScript.h" />
|
||||
|
@ -390,6 +391,7 @@ xcopy /Y "$(ProjectDir)Scripting\Scripts\*.lua" "$(TargetDir)\Scripts"</Command>
|
|||
<ClCompile Include="Game\misc.cpp" />
|
||||
<ClCompile Include="Game\trmath.cpp" />
|
||||
<ClCompile Include="Objects\Effects\tr5_electricity.cpp" />
|
||||
<ClCompile Include="Objects\TR1\Entity\tr1_bigrat.cpp" />
|
||||
<ClCompile Include="Objects\TR4\Entity\tr4_baboon.cpp" />
|
||||
<ClCompile Include="Objects\TR4\Object\tr4_laradouble.cpp" />
|
||||
<ClCompile Include="Objects\TR4\Object\tr4_sarcophagus.cpp" />
|
||||
|
|
|
@ -726,9 +726,6 @@
|
|||
<ClInclude Include="Game\trmath.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game\objectslist.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Game\lara_struct.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
|
@ -777,6 +774,12 @@
|
|||
<ClInclude Include="Objects\TR4\Entity\tr4_baboon.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Objects\objectslist.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Objects\TR1\Entity\tr1_bigrat.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Game\box.cpp">
|
||||
|
@ -1421,6 +1424,9 @@
|
|||
<ClCompile Include="Objects\TR4\Entity\tr4_baboon.cpp">
|
||||
<Filter>File di origine</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Objects\TR1\Entity\tr1_bigrat.cpp">
|
||||
<Filter>File di origine</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue