addHook("ThinkFrame", do
for player in players.iterate
if player.mo
and player.mo.health < 1
player.mo.health = 1
end
end
end)
addHook("ThinkFrame", do
for player in players.iterate
if player.mo
and player.mo.health < 1
player.mo.health = 1
end
end
end)
addHook("ShouldDamage", function(player)
if player.health < 2
P_DoPlayerPain(player.player)
return false
end
end, MT_PLAYER)
if mobj.trail %1050 == 1
and not mobj.trail == 0
Yes, I think what you have right now is applying bitwise not to mobj.trail, and then comparing that result to 0.Try using "mobj.trail != 0", "mobj.trail ~= 0" or even "not (mobj.trail == 0)" instead of "not mobj.trail == 0"?
Tbh, this is getting very confusing... Can you even modify the bit-rate cmd.angleturn executes?
local function checkm(v, player)
if player
and player.checkmark == nil
LINE 302 player.checkmark = 0
end
if player.checkmark > 0
v.drawString(110, 90, "CHECK", V_ALLOWLOWERCASE|V_GREENMAP,"middle")
end
if player.checkmark > 2*TICRATE
player.checkmark = 0
end
end
hud.add(checkm)
SRB2 log.txt said:WARNING: riderlevels.wad|LUA_SHLD:302: Do not alter player_t in HUD rendering code!
if player.mo.subsector.sector.special == 40960 then
player.startcheck = 1
else
player.startcheck = 0
end
addHook("MobjThinker", function(fshield)
if (fshield.eflags & MFE_UNDERWATER)
and not (fshield.player.powers[pw_invulnerability])
and not fshield.subsector.sector.special == 3
P_RemoveMobj(fshield)
end
end, MT_GREENORB)