From d30efa9a0a2ece6a1169ccb5147948cc5fded2c2 Mon Sep 17 00:00:00 2001 From: terminx Date: Thu, 21 Jan 2016 19:35:22 +0000 Subject: [PATCH] EVENT_MOVESECTOR. This isn't enough to really do anything with yet--more to come. git-svn-id: https://svn.eduke32.com/eduke32@5578 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/actors.c | 4 +++- polymer/eduke32/source/events_defs.h | 1 + polymer/eduke32/source/gamedef.c | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index 7c94d94a0..9fa435a37 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -748,9 +748,11 @@ static int32_t move_rotfixed_sprite(int32_t j, int32_t pivotspr, int32_t daang) static void A_MoveSector(int i) { // T1,T2 and T3 are used for all the sector moving stuff!!! + spritetype * const s = &sprite[i]; + int32_t p, pl = A_FindPlayer(s, &p); + int const k = VM_OnEventWithBoth(EVENT_MOVESECTOR, i, pl, p, T3); int j = T2; - int const k = T3; s->x += (s->xvel * (sintable[(s->ang + 512) & 2047])) >> 14; s->y += (s->xvel * (sintable[s->ang & 2047])) >> 14; diff --git a/polymer/eduke32/source/events_defs.h b/polymer/eduke32/source/events_defs.h index d17d7ecaa..9692530de 100644 --- a/polymer/eduke32/source/events_defs.h +++ b/polymer/eduke32/source/events_defs.h @@ -120,6 +120,7 @@ enum GameEvent_t { EVENT_DISPLAYSCUBA, EVENT_DISPLAYTIP, EVENT_DISPLAYACCESS, + EVENT_MOVESECTOR, #ifdef LUNATIC EVENT_ANIMATEALLSPRITES, #endif diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 5f9abb544..4bd6c1d85 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -696,6 +696,7 @@ const char *EventNames[MAXEVENTS] = "EVENT_DISPLAYSCUBA", "EVENT_DISPLAYTIP", "EVENT_DISPLAYACCESS", + "EVENT_MOVESECTOR", #ifdef LUNATIC "EVENT_ANIMATEALLSPRITES", #endif