Skip to content

Commit

Permalink
Fix crash caused by urination from fear
Browse files Browse the repository at this point in the history
Addresses #102, #105.
  • Loading branch information
Ruin0x11 committed May 16, 2022
1 parent 9cbcb1c commit c67c687
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
2 changes: 1 addition & 1 deletion 2.05-custom-gx/calculation.hsp
Original file line number Diff line number Diff line change
Expand Up @@ -2098,7 +2098,7 @@
if ( cdata(CDATA_THIRST, r1) > 12000 ) {
if ( synccheck(r1, -1) ) {
snd SOUNDLIST_WATERM
txt lang(name(r1) + "は漏らした。", name(r1) + " wets " + himself(r1) + ".")
txt lang(name(r1) + "は漏らした。", name(r1) + " wets " + yourself(r1) + ".")
}
if ( mdata(MDATA_TYPE) != MAP_TYPE_WORLD ) {
if ( cfg_dust_select == 0 ) {
Expand Down
39 changes: 39 additions & 0 deletions 2.05-custom-gx/lua.hsp
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,15 @@
hl_pushfunction *lua_elona_fltChara
hl_setfield -2, "fltChara"

hl_pushfunction *lua_elona_cbit
hl_setfield -2, "cbit"

hl_pushfunction *lua_elona_cbitmod
hl_setfield -2, "cbitmod"

hl_pushfunction *lua_elona_dmgcon
hl_setfield -2, "dmgcon"

pushDim(cdata)
pushDim(mdata)
pushDim(cdatan)
Expand Down Expand Up @@ -506,4 +515,34 @@
gosub *fltChara
return 0

*lua_elona_cbit
if hl_gettop() < 2 {
luaError("Invalid argument count")
}
p = hl_tointeger(1)
rc = hl_tointeger(2)
retval = cbit(p, rc)
hl_pushinteger(retval)
return 1

*lua_elona_cbitmod
if hl_gettop() < 3 {
luaError("Invalid argument count")
}
p = hl_tointeger(1)
rc = hl_tointeger(2)
val = hl_toboolean(3)
cbitmod p, rc, val
return 0

*lua_elona_dmgcon
if hl_gettop() < 3 {
luaError("Invalid argument count")
}
rc = hl_tointeger(1)
con = hl_tointeger(2)
p = hl_tointeger(3)
dmgcon rc, con, p
return 0

#endif

0 comments on commit c67c687

Please sign in to comment.