From 253a13ed29bc737a906c88bec45a2bfcf4e72068 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Thu, 4 Jul 2013 19:38:32 +0000 Subject: [PATCH] Lunatic: various tweaks and fixes. - fix getv movflags handling in VM_Move() - add actor.fall() - LunaCON: sanity-check some action members git-svn-id: https://svn.eduke32.com/eduke32@3924 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/gameexec.c | 2 +- polymer/eduke32/source/lunatic/control.lua | 31 ++++++++-------------- polymer/eduke32/source/lunatic/defs.ilua | 11 +++++--- polymer/eduke32/source/lunatic/lunacon.lua | 20 ++++++++++++-- polymer/eduke32/source/lunatic/test.elua | 9 +++++-- 5 files changed, 45 insertions(+), 28 deletions(-) diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index 062b540a6..b2088b2f4 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -656,7 +656,7 @@ dead: if (movflags&getv) vm.g_sp->zvel += ((*(moveptr+1)<<4)-vm.g_sp->zvel)>>1; #else if (movflags&geth) vm.g_sp->xvel += (actor[vm.g_i].mv.hvel - vm.g_sp->xvel)>>1; - if (movflags&getv) vm.g_sp->zvel += (actor[vm.g_i].mv.vvel - vm.g_sp->zvel)>>1; + if (movflags&getv) vm.g_sp->zvel += (16*actor[vm.g_i].mv.vvel - vm.g_sp->zvel)>>1; #endif if (movflags&dodgebullet && !deadflag) diff --git a/polymer/eduke32/source/lunatic/control.lua b/polymer/eduke32/source/lunatic/control.lua index 935948a2e..946833059 100644 --- a/polymer/eduke32/source/lunatic/control.lua +++ b/polymer/eduke32/source/lunatic/control.lua @@ -174,6 +174,7 @@ local check_tile_idx = bcheck.tile_idx local check_sprite_idx = bcheck.sprite_idx local check_player_idx = bcheck.player_idx local check_sound_idx = bcheck.sound_idx +local check_number = bcheck.number local check_type = bcheck.type -- Will contain [