SVN r158 (trunk)

This commit is contained in:
Christoph Oelckers 2006-06-01 00:05:03 +00:00
parent 92dff5f302
commit fd1a239c66
5 changed files with 17 additions and 8 deletions

View file

@ -1969,8 +1969,8 @@ reparse:
if(do_level >= sizeof(int)*8)
{
printf("\n\n!!! %s error, line %d !!!\n"
"Too many 'do' commands enountered (max: %ud)!\n\n",
fname, curr_line, sizeof(int)*8 - 1);
"Too many 'do' commands enountered (max: %lud)!\n\n",
fname, curr_line, (unsigned long)(sizeof(int)*8 - 1));
snprintf(linebuf, sizeof(linebuf), "exit -1\n");
goto reparse;
}
@ -2687,8 +2687,8 @@ dir_write_check:
if(!tmp)
{
fprintf(stderr, "\n\n\n*** Critical Error ***\n"
"Out of memory allocating %ud defines!\n\n",
num_defines+1);
"Out of memory allocating %lud defines!\n\n",
(unsigned long)(num_defines+1));
snprintf(linebuf, sizeof(linebuf), "exit -1\n");
goto reparse;
}

View file

@ -1,3 +1,12 @@
May 31, 2006 (Changes by Graf Zahl)
- Fixed: Ammo items dropped by monsters that have a default amount of 1 didn't
contain any ammo at all.
- Fixed: PClass::FreeIndices was declared as TArray<size_t> in the header but
as TArray<unsigned int> in the cpp file.
May 28, 2006 (Changes by Graf Zahl)
- Fixed: PowerFrighteners must check Owner for NULL in InitEffect and EndEffect.
May 28, 2006
- Fixed: When building GL nodes for Deathkings MAP42, one polyobject had one
of its segs thrown away, so the map could not start. This was because the

View file

@ -298,7 +298,7 @@ protected:
private:
static TArray<DObject *> Objects;
static TArray<size_t> FreeIndices;
static TArray<unsigned int> FreeIndices;
static TArray<DObject *> ToDestroy;
static void DestroyScan (DObject *obj);

View file

@ -1087,7 +1087,7 @@ END_DEFAULTS
void APowerFrightener::InitEffect ()
{
if (Owner->player == NULL)
if (Owner== NULL || Owner->player == NULL)
return;
Owner->player->cheats |= CF_FRIGHTENING;
@ -1101,7 +1101,7 @@ void APowerFrightener::InitEffect ()
void APowerFrightener::EndEffect ()
{
if (Owner->player == NULL)
if (Owner== NULL || Owner->player == NULL)
return;
Owner->player->cheats &= ~CF_FRIGHTENING;

View file

@ -2222,7 +2222,7 @@ AInventory *P_DropItem (AActor *source, const PClass *type, int special, int cha
else if (mo->IsKindOf (RUNTIME_CLASS(AAmmo)))
{
// Half ammo when dropped by bad guys.
inv->Amount = inv->GetClass()->Meta.GetMetaInt (AIMETA_DropAmount, inv->Amount / 2 );
inv->Amount = inv->GetClass()->Meta.GetMetaInt (AIMETA_DropAmount, MAX(1, inv->Amount / 2 ));
}
else if (mo->IsKindOf (RUNTIME_CLASS(AWeapon)))
{