mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-20 10:43:49 +00:00
- fixed touchplate initialization
This was still using older code - the current native version was also not removed from the spawn function.
This commit is contained in:
parent
f515939fde
commit
d44b637f1b
5 changed files with 4 additions and 39 deletions
|
@ -53,7 +53,6 @@ void premapcontroller(DDukeActor* ac)
|
|||
case MUSICANDSFX:
|
||||
case RESPAWN:
|
||||
case SECTOREFFECTOR:
|
||||
case TOUCHPLATE:
|
||||
ac->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN | CSTAT_SPRITE_ALIGNMENT_MASK);
|
||||
break;
|
||||
|
||||
|
|
|
@ -637,30 +637,6 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
act->spr.lotag = 9999;
|
||||
ChangeActorStat(act, STAT_STANDABLE);
|
||||
break;
|
||||
case TOUCHPLATE:
|
||||
act->temp_pos.Z = sectp->floorz;
|
||||
if (sectp->lotag != 1 && sectp->lotag != 2)
|
||||
sectp->setfloorz(act->spr.pos.Z);
|
||||
if (!isWorldTour())
|
||||
{
|
||||
if (act->spr.pal && ud.multimode > 1)
|
||||
{
|
||||
act->spr.scale = DVector2(0, 0);
|
||||
ChangeActorStat(act, STAT_MISC);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else { // Twentieth Anniversary World Tour addition
|
||||
if ((act->spr.pal == 1 && ud.multimode > 1) // Single-game Only
|
||||
|| (act->spr.pal == 2 && (ud.multimode == 1 || (ud.multimode > 1 && ud.coop != 1))) // Co-op Only
|
||||
|| (act->spr.pal == 3 && (ud.multimode == 1 || (ud.multimode > 1 && ud.coop == 1)))) // Dukematch Only
|
||||
{
|
||||
act->spr.scale = DVector2(0, 0);
|
||||
ChangeActorStat(act, STAT_MISC);
|
||||
break;
|
||||
}
|
||||
}
|
||||
[[fallthrough]];
|
||||
case WATERBUBBLEMAKER:
|
||||
if (act->spr.hitag && act->spr.picnum == WATERBUBBLEMAKER)
|
||||
{ // JBF 20030913: Pisses off move(), eg. in bobsp2
|
||||
|
|
|
@ -671,17 +671,6 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
act->spr.lotag = 9999;
|
||||
ChangeActorStat(act, STAT_STANDABLE);
|
||||
break;
|
||||
case TOUCHPLATE:
|
||||
act->temp_pos.Z = sectp->floorz;
|
||||
if (sectp->lotag != 1 && sectp->lotag != 2)
|
||||
sectp->setfloorz(act->spr.pos.Z);
|
||||
if (act->spr.pal && ud.multimode > 1)
|
||||
{
|
||||
act->spr.scale = DVector2(0, 0);
|
||||
ChangeActorStat(act, STAT_MISC);
|
||||
break;
|
||||
}
|
||||
[[fallthrough]];
|
||||
case WATERBUBBLEMAKER:
|
||||
act->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||
ChangeActorStat(act, STAT_STANDABLE);
|
||||
|
|
|
@ -852,7 +852,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_DukeLevel, operatemasterswitches, operatemastersw
|
|||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_DukeLevel, operateactivators, operateactivators)
|
||||
DEFINE_ACTION_FUNCTION(_DukeLevel, operateactivators)//, operateactivators)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_INT(lotag);
|
||||
|
|
|
@ -26,7 +26,7 @@ class DukeTouchPlate : DukeActor
|
|||
override void Initialize()
|
||||
{
|
||||
let sectp = self.sector;
|
||||
self.temp_data[2] = sectp.floorz;
|
||||
self.temp_pos.Z = sectp.floorz;
|
||||
if (sectp.lotag != 1 && sectp.lotag != 2)
|
||||
sectp.setfloorz(self.pos.Z);
|
||||
if (!checkspawn())
|
||||
|
@ -35,7 +35,7 @@ class DukeTouchPlate : DukeActor
|
|||
self.ChangeStat(STAT_MISC);
|
||||
return;
|
||||
}
|
||||
self.cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||
self.cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -93,6 +93,7 @@ class DukeTouchPlate : DukeActor
|
|||
{
|
||||
if (self.temp_data[0] == 0 && !dlevel.check_activator_motion(self.lotag))
|
||||
{
|
||||
Console.Printf("Trigger %d", self.spawnindex);
|
||||
self.temp_data[0] = 1;
|
||||
self.temp_data[1] = 1;
|
||||
self.temp_data[3] = !self.temp_data[3];
|
||||
|
|
Loading…
Reference in a new issue