mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
LunaCON: for readgamevar, if ud.config.scripthandle < 0, keep value, don't err.
git-svn-id: https://svn.eduke32.com/eduke32@4256 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
3b1515e51b
commit
8d47e476c7
5 changed files with 9 additions and 5 deletions
|
@ -1832,6 +1832,7 @@ ACTOR_STATIC void G_MoveStandables(void)
|
||||||
|
|
||||||
if (s->picnum == TRIPBOMB)
|
if (s->picnum == TRIPBOMB)
|
||||||
{
|
{
|
||||||
|
// TIMER_CONTROL
|
||||||
if (actor[i].t_data[6] == 1)
|
if (actor[i].t_data[6] == 1)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -4680,6 +4681,7 @@ ACTOR_STATIC void G_MoveActors(void)
|
||||||
|
|
||||||
DETONATEB:
|
DETONATEB:
|
||||||
// Pipebomb control set to timer? (see player.c)
|
// Pipebomb control set to timer? (see player.c)
|
||||||
|
// TIMER_CONTROL
|
||||||
if (s->picnum == HEAVYHBOMB && t[6] == 1)
|
if (s->picnum == HEAVYHBOMB && t[6] == 1)
|
||||||
{
|
{
|
||||||
/* if(s->extra >= 1)
|
/* if(s->extra >= 1)
|
||||||
|
|
|
@ -1882,9 +1882,9 @@ function _savegamevar(name, val)
|
||||||
val, 0, 0);
|
val, 0, 0);
|
||||||
end
|
end
|
||||||
|
|
||||||
function _readgamevar(name)
|
function _readgamevar(name, ov)
|
||||||
if (ffiC.ud.config.scripthandle < 0) then
|
if (ffiC.ud.config.scripthandle < 0) then
|
||||||
return
|
return ov
|
||||||
end
|
end
|
||||||
|
|
||||||
assert(type(name)=="string")
|
assert(type(name)=="string")
|
||||||
|
|
|
@ -38,8 +38,8 @@ local shtab_methods = {
|
||||||
-- Remap consecutive blocks of 16 color indices and return this new shade
|
-- Remap consecutive blocks of 16 color indices and return this new shade
|
||||||
-- table.
|
-- table.
|
||||||
--
|
--
|
||||||
-- <idxs16>: table with idxs16[1] .. idxs16[16] >= 1 and <= 16
|
-- <idxs16>: table with idxs16[0] .. idxs16[15] >= 0 and <= 15
|
||||||
-- (i.e. 1-based indices of such 16-tuples)
|
-- (i.e. 0-based indices of such 16-tuples)
|
||||||
--
|
--
|
||||||
-- For example, the table
|
-- For example, the table
|
||||||
-- { [0]=0,1, 2,3, 5,4, 6,7, 8,13, 10,11, 12,9, 14,15 }
|
-- { [0]=0,1, 2,3, 5,4, 6,7, 8,13, 10,11, 12,9, 14,15 }
|
||||||
|
|
|
@ -2230,7 +2230,7 @@ local handle =
|
||||||
if (dosave) then
|
if (dosave) then
|
||||||
return format("_con._savegamevar(%q,%s)", identifier, code)
|
return format("_con._savegamevar(%q,%s)", identifier, code)
|
||||||
else
|
else
|
||||||
return format("%s=_con._readgamevar(%q)", code, identifier)
|
return format("%s=_con._readgamevar(%q,%s)", code, identifier, code)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
|
|
@ -1574,6 +1574,7 @@ int32_t A_ShootWithZvel(int32_t i, int32_t atwith, int32_t override_zvel)
|
||||||
actor[k].t_data[7]=lLifetime
|
actor[k].t_data[7]=lLifetime
|
||||||
+ mulscale(krand(),lLifetimeVar, 14)
|
+ mulscale(krand(),lLifetimeVar, 14)
|
||||||
- lLifetimeVar;
|
- lLifetimeVar;
|
||||||
|
// TIMER_CONTROL
|
||||||
actor[k].t_data[6]=1;
|
actor[k].t_data[6]=1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3915,6 +3916,7 @@ static void P_ProcessWeapon(int32_t snum)
|
||||||
actor[j].t_data[7]= ltime
|
actor[j].t_data[7]= ltime
|
||||||
+ mulscale(krand(),lv, 14)
|
+ mulscale(krand(),lv, 14)
|
||||||
- lv;
|
- lv;
|
||||||
|
// TIMER_CONTROL
|
||||||
actor[j].t_data[6]=1;
|
actor[j].t_data[6]=1;
|
||||||
}
|
}
|
||||||
else actor[j].t_data[6]=2;
|
else actor[j].t_data[6]=2;
|
||||||
|
|
Loading…
Reference in a new issue