mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- sop.match_event_sprite
This commit is contained in:
parent
04657ab559
commit
0e629eb322
4 changed files with 6 additions and 5 deletions
|
@ -1694,6 +1694,7 @@ struct SECTOR_OBJECTstruct
|
|||
};
|
||||
|
||||
DSWActor* so_actors[MAX_SO_SPRITE]; // hold the actors of the object
|
||||
DSWActor* match_event_actor; // spritenum of the match event sprite
|
||||
|
||||
int vel, // velocity
|
||||
vel_tgt, // target velocity
|
||||
|
@ -1758,7 +1759,6 @@ struct SECTOR_OBJECTstruct
|
|||
save_vel, // save velocity
|
||||
save_spin_speed, // save spin speed
|
||||
match_event, // match number
|
||||
match_event_sprite, // spritenum of the match event sprite
|
||||
// SO Scaling Vector Info
|
||||
scale_type, // type of scaling - enum controled
|
||||
scale_active_type, // activated by a switch or trigger
|
||||
|
|
|
@ -136,10 +136,10 @@ DoSOevent(short match, short state)
|
|||
}
|
||||
}
|
||||
|
||||
if (sop->match_event_sprite == -1)
|
||||
if (sop->match_event_actor == nullptr)
|
||||
continue;
|
||||
|
||||
me_sp = &sprite[sop->match_event_sprite];
|
||||
me_sp = &sop->match_event_actor->s();
|
||||
|
||||
// toggle
|
||||
if (state == -1)
|
||||
|
|
|
@ -697,7 +697,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, SECTOR_OBJECTstruc
|
|||
("save_vel", w.save_vel, def->save_vel)
|
||||
("save_spin_speed", w.save_spin_speed, def->save_spin_speed)
|
||||
("match_event", w.match_event, def->match_event)
|
||||
("match_event_sprite", w.match_event_sprite, def->match_event_sprite)
|
||||
("match_event_sprite", w.match_event_actor, def->match_event_actor)
|
||||
("scale_type", w.scale_type, def->scale_type)
|
||||
("scale_active_type", w.scale_active_type, def->scale_active_type)
|
||||
("scale_dist", w.scale_dist, def->scale_dist)
|
||||
|
|
|
@ -1055,6 +1055,7 @@ SetupSectorObject(short sectnum, short tag)
|
|||
|
||||
memset(sop->sectp, 0, sizeof(sop->sectp));
|
||||
memset(sop->so_actors, 0, sizeof(sop->so_actors));
|
||||
sop->match_event_actor = nullptr;
|
||||
sop->crush_z = 0;
|
||||
sop->drive_angspeed = 0;
|
||||
sop->drive_angslide = 0;
|
||||
|
@ -1322,7 +1323,7 @@ SetupSectorObject(short sectnum, short tag)
|
|||
break;
|
||||
case SO_MATCH_EVENT:
|
||||
sop->match_event = sp->lotag;
|
||||
sop->match_event_sprite = SpriteNum;
|
||||
sop->match_event_actor = actor;
|
||||
break;
|
||||
case SO_SET_SPEED:
|
||||
sop->vel = sp->lotag * 256;
|
||||
|
|
Loading…
Reference in a new issue