mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
Fix unsigned/signed comparison
This commit is contained in:
parent
0c1d0d8f5c
commit
ff190b7a88
2 changed files with 4 additions and 4 deletions
|
|
@ -11006,7 +11006,7 @@ void P_SpawnPrecipitation(void)
|
||||||
{
|
{
|
||||||
INT32 i, j, k;
|
INT32 i, j, k;
|
||||||
mobjtype_t type = precipprops[curWeather].type;
|
mobjtype_t type = precipprops[curWeather].type;
|
||||||
INT32 randomstates = mobjinfo[type].damage;
|
UINT8 randomstates = (UINT8)mobjinfo[type].damage;
|
||||||
fixed_t basex, basey, x, y, z, height;
|
fixed_t basex, basey, x, y, z, height;
|
||||||
subsector_t *precipsector = NULL;
|
subsector_t *precipsector = NULL;
|
||||||
precipmobj_t *rainmo = NULL;
|
precipmobj_t *rainmo = NULL;
|
||||||
|
|
@ -11053,7 +11053,7 @@ void P_SpawnPrecipitation(void)
|
||||||
{
|
{
|
||||||
rainmo = P_SpawnPrecipMobj(x, y, z, type);
|
rainmo = P_SpawnPrecipMobj(x, y, z, type);
|
||||||
|
|
||||||
if (randomstates > 0 && randomstates < UINT8_MAX)
|
if (randomstates > 0)
|
||||||
{
|
{
|
||||||
UINT8 mrand = M_RandomByte();
|
UINT8 mrand = M_RandomByte();
|
||||||
UINT8 threshold = UINT8_MAX / (randomstates + 1);
|
UINT8 threshold = UINT8_MAX / (randomstates + 1);
|
||||||
|
|
|
||||||
|
|
@ -2041,7 +2041,7 @@ void P_SwitchWeather(UINT8 newWeather)
|
||||||
}
|
}
|
||||||
else if (swap != MT_NULL) // Rather than respawn all that crap, reuse it!
|
else if (swap != MT_NULL) // Rather than respawn all that crap, reuse it!
|
||||||
{
|
{
|
||||||
INT32 randomstates = mobjinfo[swap].damage;
|
UINT8 randomstates = (UINT8)mobjinfo[swap].damage;
|
||||||
thinker_t *think;
|
thinker_t *think;
|
||||||
precipmobj_t *precipmobj;
|
precipmobj_t *precipmobj;
|
||||||
statenum_t st;
|
statenum_t st;
|
||||||
|
|
@ -2057,7 +2057,7 @@ void P_SwitchWeather(UINT8 newWeather)
|
||||||
|
|
||||||
st = mobjinfo[swap].spawnstate;
|
st = mobjinfo[swap].spawnstate;
|
||||||
|
|
||||||
if (randomstates > 0 && randomstates < UINT8_MAX)
|
if (randomstates > 0)
|
||||||
{
|
{
|
||||||
UINT8 mrand = M_RandomByte();
|
UINT8 mrand = M_RandomByte();
|
||||||
UINT8 threshold = UINT8_MAX / (randomstates + 1);
|
UINT8 threshold = UINT8_MAX / (randomstates + 1);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue