mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-17 09:11:25 +00:00
- more properties to get rid of the remaining actor type checks in move_d and move_r.
This commit is contained in:
parent
c4c035a527
commit
5a2410cbbb
5 changed files with 22 additions and 26 deletions
|
@ -29,3 +29,5 @@ xx(justjump2_factor)
|
|||
xx(windang_factor)
|
||||
xx(floating_floordist)
|
||||
xx(floating_ceilingdist)
|
||||
xx(landmovefactor)
|
||||
xx(watermovefactor)
|
||||
|
|
|
@ -1049,7 +1049,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
|
|||
if (actor->counter < 16)
|
||||
actor->vel.Z -= BobVal(512 + (actor->counter << 4)) * actor->FloatVar(NAME_jumptoplayer_factor);
|
||||
}
|
||||
if (a & justjump1)
|
||||
else if (a & justjump1)
|
||||
{
|
||||
if (actor->counter < 8)
|
||||
actor->vel.Z -= BobVal(512 + (actor->counter << 4)) * actor->FloatVar(NAME_justjump1_factor);
|
||||
|
@ -1196,30 +1196,13 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
|
|||
}
|
||||
}
|
||||
}
|
||||
if (isRRRA())
|
||||
if (actor->sector()->lotag != ST_1_ABOVE_WATER)
|
||||
{
|
||||
if (actor->sector()->lotag != ST_1_ABOVE_WATER)
|
||||
{
|
||||
switch (actor->spr.picnum)
|
||||
{
|
||||
case RTILE_MINIONBOAT:
|
||||
case RTILE_HULKBOAT:
|
||||
case RTILE_CHEERBOAT:
|
||||
daxvel *= 0.5;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (actor->sector()->lotag == ST_1_ABOVE_WATER)
|
||||
{
|
||||
switch (actor->spr.picnum)
|
||||
{
|
||||
case RTILE_BIKERB:
|
||||
case RTILE_BIKERBV2:
|
||||
case RTILE_CHEERB:
|
||||
daxvel *= 0.5;
|
||||
break;
|
||||
}
|
||||
}
|
||||
daxvel *= actor->FloatVar(NAME_landmovefactor);
|
||||
}
|
||||
else
|
||||
{
|
||||
daxvel *= actor->FloatVar(NAME_watermovefactor);
|
||||
}
|
||||
|
||||
Collision coll;
|
||||
|
|
|
@ -426,8 +426,6 @@ enum sflags3_t
|
|||
SFLAG3_NOJIBS = 0x01000000,
|
||||
SFLAG3_NOVERTICALMOVE = 0x02000000,
|
||||
SFLAG3_MOVE_NOPLAYERINTERACT = 0x04000000,
|
||||
|
||||
|
||||
};
|
||||
|
||||
using EDukeFlags3 = TFlags<sflags3_t, uint32_t>;
|
||||
|
|
|
@ -7,6 +7,7 @@ class RedneckBikerBV2 : DukeActor
|
|||
+INTERNAL_BADGUY;
|
||||
+KILLCOUNT;
|
||||
+LOOKALLAROUND;
|
||||
watermovefactor 0.5;
|
||||
}
|
||||
override void Initialize()
|
||||
{
|
||||
|
@ -23,6 +24,7 @@ class RedneckBikerB : DukeActor
|
|||
+INTERNAL_BADGUY;
|
||||
+KILLCOUNT;
|
||||
+LOOKALLAROUND;
|
||||
watermovefactor 0.5;
|
||||
}
|
||||
override void Initialize()
|
||||
{
|
||||
|
@ -71,6 +73,7 @@ class RedneckCheerleaderB : DukeActor
|
|||
+INTERNAL_BADGUY;
|
||||
+KILLCOUNT;
|
||||
+LOOKALLAROUND;
|
||||
watermovefactor 0.5;
|
||||
}
|
||||
override void Initialize()
|
||||
{
|
||||
|
@ -140,6 +143,7 @@ class RedneckMinionBoat : DukeActor
|
|||
+LOOKALLAROUND;
|
||||
+DONTDIVE;
|
||||
falladjustz 3;
|
||||
landmovefactor 0.5;
|
||||
}
|
||||
override void Initialize()
|
||||
{
|
||||
|
@ -158,6 +162,7 @@ class RedneckHulkBoat : DukeActor
|
|||
+LOOKALLAROUND;
|
||||
+DONTDIVE;
|
||||
falladjustz 12;
|
||||
landmovefactor 0.5;
|
||||
}
|
||||
override void Initialize()
|
||||
{
|
||||
|
@ -176,6 +181,7 @@ class RedneckCheerBoat : DukeActor
|
|||
+LOOKALLAROUND;
|
||||
+DONTDIVE;
|
||||
falladjustz 6;
|
||||
landmovefactor 0.5;
|
||||
}
|
||||
override void Initialize()
|
||||
{
|
||||
|
|
|
@ -122,6 +122,8 @@ class DukeActor : CoreActor native
|
|||
windang_factor 2.667;
|
||||
floating_floordist 0;
|
||||
floating_ceilingdist 66;
|
||||
landmovefactor 1;
|
||||
watermovefactor 1;
|
||||
}
|
||||
enum EStatnums
|
||||
{
|
||||
|
@ -254,6 +256,8 @@ class DukeActor : CoreActor native
|
|||
meta double windang_factor;
|
||||
meta double floating_floordist;
|
||||
meta double floating_ceilingdist;
|
||||
meta double landmovefactor;
|
||||
meta double watermovefactor;
|
||||
|
||||
property prefix: none;
|
||||
property gutsoffset: gutsoffset;
|
||||
|
@ -271,6 +275,9 @@ class DukeActor : CoreActor native
|
|||
property windang_factor: windang_factor;
|
||||
property floating_floordist: floating_floordist;
|
||||
property floating_ceilingdist: floating_ceilingdist;
|
||||
property landmovefactor: landmovefactor;
|
||||
property watermovefactor: watermovefactor;
|
||||
|
||||
|
||||
native void SetSpritesetImage(int index);
|
||||
native int GetSpritesetSize();
|
||||
|
|
Loading…
Reference in a new issue