diff --git a/.gitlab/ci/templates/srb2ci.yml b/.gitlab/ci/templates/srb2ci.yml index 3716d9df921407cb29081af301a5b6a3d92db459..bdf8a3ed66d8126559c25e5563da432da41932e0 100644 --- a/.gitlab/ci/templates/srb2ci.yml +++ b/.gitlab/ci/templates/srb2ci.yml @@ -61,7 +61,7 @@ - - | # apt_update echo -e "\e[0Ksection_start:`date +%s`:apt_update[collapsed=true]\r\e[0KUpdating APT listing" - - apt-get update + - timeout 2m apt-get update || timeout 2m apt-get update - | # apt_update echo -e "\e[0Ksection_end:`date +%s`:apt_update\r\e[0K" diff --git a/src/lua_hook.h b/src/lua_hook.h index 90a11d05d66dbf89a6fabd30123b63aae965235f..ce79cd1cb70a2e81f9d531ed15094e7cf42b1e75 100644 --- a/src/lua_hook.h +++ b/src/lua_hook.h @@ -72,6 +72,7 @@ automatically. X (MusicChange),\ X (PlayerHeight),/* override player height */\ X (PlayerCanEnterSpinGaps),\ + X (AddonLoaded),\ X (KeyDown),\ X (KeyUp),\ diff --git a/src/p_enemy.c b/src/p_enemy.c index 2ae7276dfcca0518f74712964f6b1c1cd7265a8f..59ca954093f80b2242b0cec40be6ea60776d1e92 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -14395,7 +14395,7 @@ void A_LavafallLava(mobj_t *actor) if (LUA_CallAction(A_LAVAFALLLAVA, actor)) return; - if ((40 - actor->fuse) % (2*(actor->scale >> FRACBITS))) + if ((40 - actor->fuse) % max(2*(actor->scale >> FRACBITS), 1)) // avoid crashes if actor->scale < FRACUNIT return; // Don't spawn lava unless a player is nearby. diff --git a/src/p_setup.c b/src/p_setup.c index 39be19d546c99a3cc9e90d63bac241f24774f391..4356e057447476d71b8523569eea44f714e7659c 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -8464,6 +8464,8 @@ static boolean P_LoadAddon(UINT16 numlumps) SendNetXCmd(XD_EXITLEVEL, NULL, 0); } + LUA_HookVoid(HOOK(AddonLoaded)); + return true; }