gzdoom-gles/wadsrc/static/zscript/shared/ice.txt
Christoph Oelckers fbf8084999 - corrected the export signatures of several script exports to contain the correct classes, so that the fudging in FindFunction could be removed.
- fixed PARAM_ACTION_PROLOGUE to assign correct types to the implicit pointers. It gave the actual class to the wrong one, which until now did not matter because all functions were using 'Actor', regardless of actual class association.
- fixed the definition of IceChunk and removed some redundant code here. Since A_FreezeDeathChunks already calls SetState, which in turn calls the state's action function, there is no need to call it again explicitly.
2016-12-02 18:52:58 +01:00

73 lines
1 KiB
Text

//==========================================================================
//
// Ice chunk
//
//==========================================================================
class IceChunk : Actor
{
Default
{
Radius 3;
Height 4;
Mass 5;
Gravity 0.125;
+DROPOFF
+CANNOTPUSH
+FLOORCLIP
+NOTELEPORT
+NOBLOCKMAP
+MOVEWITHSECTOR
}
void A_IceSetTics ()
{
tics = 70 + (random[IceTics]() & 63);
Name dtype = GetFloorTerrain().DamageMOD;
if (dtype == 'Fire')
{
tics >>= 2;
}
else if (dtype == 'Ice')
{
tics <<= 1;
}
}
States
{
Spawn:
ICEC ABCD 10 A_IceSetTics;
Stop;
}
}
//==========================================================================
//
// A chunk of ice that is also a player
//
//==========================================================================
class IceChunkHead : PlayerChunk
{
Default
{
Radius 3;
Height 4;
Mass 5;
Gravity 0.125;
DamageType "Ice";
+DROPOFF
+CANNOTPUSH
}
States
{
Spawn:
ICEC A 0;
ICEC A 10 A_CheckPlayerDone;
wait;
}
}