From 6ff6a6af002b1f46bd50524fb9da16b460f1a333 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 13 Feb 2019 14:59:55 +0100 Subject: [PATCH 1/2] - made gameaction read only The script side cannot do anything useful with this, because most actions require parameters in global variables, so this is a first grade candidate for rogue mods to make the engine misbehave. --- wadsrc/static/zscript/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wadsrc/static/zscript/base.txt b/wadsrc/static/zscript/base.txt index 2ba4756392..be73e3f4df 100644 --- a/wadsrc/static/zscript/base.txt +++ b/wadsrc/static/zscript/base.txt @@ -15,7 +15,7 @@ struct _ native // These are the global variables, the struct is only here to av native readonly ui bool netgame; native readonly bool automapactive; - native play uint gameaction; + native readonly uint gameaction; native readonly int gamestate; native readonly TextureID skyflatnum; native readonly Font smallfont; From 914818cb8815eb8742099154b0b615315bcac1e6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 13 Feb 2019 20:11:41 +0100 Subject: [PATCH 2/2] - fixed run health clamping. This didn't scale the move factors properly. --- wadsrc/static/zscript/shared/player.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wadsrc/static/zscript/shared/player.txt b/wadsrc/static/zscript/shared/player.txt index ecb029c198..a1f35d2984 100644 --- a/wadsrc/static/zscript/shared/player.txt +++ b/wadsrc/static/zscript/shared/player.txt @@ -1169,8 +1169,8 @@ class PlayerPawn : Actor // Strife's player can't run when its health is below 10 if (health <= RunHealth) { - forward = clamp(forward, -gameinfo.normforwardmove[0], gameinfo.normforwardmove[0]); - side = clamp(side, -gameinfo.normsidemove[0], gameinfo.normsidemove[0]); + forward = clamp(forward, -gameinfo.normforwardmove[0]*256, gameinfo.normforwardmove[0]*256); + side = clamp(side, -gameinfo.normsidemove[0]*256, gameinfo.normsidemove[0]*256); } // [GRB]