mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
- converted several of RR's static init sprite types to the class system.
This commit is contained in:
parent
5b34917f62
commit
4078c6d6bd
5 changed files with 53 additions and 11 deletions
|
@ -27,6 +27,13 @@ xx(DukeNaturalLightning)
|
|||
xx(RedneckBowlingPin)
|
||||
xx(DukeReactor)
|
||||
xx(DukeFootprints)
|
||||
xx(RedneckMinecartDef)
|
||||
xx(RedneckMinecartSound)
|
||||
xx(RedneckMinecartInner)
|
||||
xx(RedneckJaildoorDef)
|
||||
xx(RedneckJaildoorSound)
|
||||
xx(RedneckGeometryEffect)
|
||||
xx(RedneckKeyinfoSetter)
|
||||
|
||||
xx(spawnstate)
|
||||
xx(brokenstate)
|
||||
|
|
|
@ -338,7 +338,7 @@ void prelevel_d(int g, TArray<DDukeActor*>& actors)
|
|||
DukeStatIterator it1(STAT_EFFECTOR);
|
||||
while (auto ac = it1.Next())
|
||||
{
|
||||
if (ac->spr.lotag == 12 && ac->spr.hitag == actor->spr.lotag)
|
||||
if (ac->spr.lotag == SE_12_LIGHT_SWITCH && ac->spr.hitag == actor->spr.lotag)
|
||||
ac->temp_data[0] = 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -457,13 +457,13 @@ void prelevel_r(int g, TArray<DDukeActor*>& actors)
|
|||
dist = 0;
|
||||
while (auto act = it.Next())
|
||||
{
|
||||
if (act->spr.picnum == RRJAILDOOR)
|
||||
if (act->GetClass()->TypeName == NAME_RedneckJaildoorDef)
|
||||
{
|
||||
dist = act->spr.lotag;
|
||||
speed = act->spr.hitag;
|
||||
act->Destroy();
|
||||
}
|
||||
if (act->spr.picnum == RRJAILDOORSOUND)
|
||||
if (act->GetClass()->TypeName == NAME_RedneckJaildoorSound)
|
||||
{
|
||||
sound = act->spr.lotag;
|
||||
act->Destroy();
|
||||
|
@ -497,14 +497,14 @@ void prelevel_r(int g, TArray<DDukeActor*>& actors)
|
|||
DukeSectIterator it(sectp);
|
||||
while (auto act = it.Next())
|
||||
{
|
||||
if (act->spr.picnum == RRMINECART)
|
||||
if (act->GetClass()->TypeName == NAME_RedneckMinecartDef)
|
||||
{
|
||||
dist = act->spr.lotag;
|
||||
speed = act->spr.hitag;
|
||||
DukeSpriteIterator itt;
|
||||
while(auto act1 = itt.Next())
|
||||
{
|
||||
if (act1->spr.picnum == RRMINECARTINNER)
|
||||
if (act1->GetClass()->TypeName == NAME_RedneckMinecartInner)
|
||||
if (act1->spr.lotag == act->sectno()) // bad map format design... Should have used a tag instead...
|
||||
{
|
||||
childsectnum = act1->sector();
|
||||
|
@ -513,7 +513,7 @@ void prelevel_r(int g, TArray<DDukeActor*>& actors)
|
|||
}
|
||||
act->Destroy();
|
||||
}
|
||||
if (act->spr.picnum == RRMINECARTSOUND)
|
||||
if (act->GetClass()->TypeName == NAME_RedneckMinecartSound)
|
||||
{
|
||||
sound = act->spr.lotag;
|
||||
act->Destroy();
|
||||
|
@ -547,7 +547,7 @@ void prelevel_r(int g, TArray<DDukeActor*>& actors)
|
|||
for (auto actor : actors)
|
||||
{
|
||||
if (!actor->exists()) continue;
|
||||
if (actor->spr.picnum == RRTILE19)
|
||||
if (actor->GetClass()->TypeName == NAME_RedneckGeometryEffect)
|
||||
{
|
||||
if (geocnt > 64)
|
||||
I_Error("Too many geometry effects");
|
||||
|
@ -556,7 +556,7 @@ void prelevel_r(int g, TArray<DDukeActor*>& actors)
|
|||
geosector[geocnt] = actor->sector();
|
||||
for (auto actor2 : actors)
|
||||
{
|
||||
if (actor && actor->spr.lotag == actor2->spr.lotag && actor2 != actor && actor2->spr.picnum == RRTILE19)
|
||||
if (actor && actor->spr.lotag == actor2->spr.lotag && actor2 != actor && actor2->GetClass() == actor->GetClass())
|
||||
{
|
||||
if (actor2->spr.hitag == 1)
|
||||
{
|
||||
|
@ -595,9 +595,9 @@ void prelevel_r(int g, TArray<DDukeActor*>& actors)
|
|||
{
|
||||
if (iseffector(actor) && actor->spr.lotag == SE_14_SUBWAY_CAR)
|
||||
spriteinit_r(actor, actors);
|
||||
if (actor->spr.picnum == RRTILE19)
|
||||
if (actor->GetClass()->TypeName == NAME_RedneckGeometryEffect)
|
||||
actor->Destroy();
|
||||
if (actor->spr.picnum == RRTILE34)
|
||||
if (actor->spr.picnum == NAME_RedneckKeyinfoSetter)
|
||||
{
|
||||
actor->sector()->keyinfo = uint8_t(actor->spr.lotag);
|
||||
actor->Destroy();
|
||||
|
@ -645,7 +645,7 @@ void prelevel_r(int g, TArray<DDukeActor*>& actors)
|
|||
DukeStatIterator it1(STAT_EFFECTOR);
|
||||
while (auto actj = it1.Next())
|
||||
{
|
||||
if (actj->spr.lotag == 12 && actj->spr.hitag == ac->spr.lotag)
|
||||
if (actj->spr.lotag == SE_12_LIGHT_SWITCH && actj->spr.hitag == ac->spr.lotag)
|
||||
actj->temp_data[0] = 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,6 +18,14 @@ spawnclasses
|
|||
67 = DukeDummyCtrl
|
||||
71 = DukeSoundFX
|
||||
|
||||
64 = RedneckMinecartDef
|
||||
65 = RedneckMinecartSound
|
||||
66 = RedneckMinecartInner
|
||||
11 = RedneckJaildoorDef
|
||||
38 = RedneckJaildoorSound
|
||||
19 = RedneckGeometryEffect
|
||||
34 = RedneckKeyinfoSetter
|
||||
|
||||
1298 = DukeCranePole
|
||||
1299 = DukeCrane
|
||||
1092 = DukeWaterFountain
|
||||
|
|
|
@ -178,3 +178,30 @@ class DukeSoundFX : DukeActor
|
|||
}
|
||||
}
|
||||
|
||||
class RedneckMinecartDef : DukeActor
|
||||
{
|
||||
}
|
||||
|
||||
class RedneckMinecartSound : DukeActor
|
||||
{
|
||||
}
|
||||
|
||||
class RedneckMinecartInner : DukeActor
|
||||
{
|
||||
}
|
||||
|
||||
class RedneckJaildoorDef : DukeActor
|
||||
{
|
||||
}
|
||||
|
||||
class RedneckJaildoorSound : DukeActor
|
||||
{
|
||||
}
|
||||
|
||||
class RedneckGeometryEffect : DukeActor
|
||||
{
|
||||
}
|
||||
|
||||
class RedneckKeyinfoSetter : DukeActor
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue