pkgsrc/games/ivan/patches/patch-ak

24 lines
1.1 KiB
Text

$NetBSD: patch-ak,v 1.2 2014/02/09 17:09:03 wiedi Exp $
--- Main/Source/lsquare.cpp.orig 2004-12-10 15:51:47.000000000 +0000
+++ Main/Source/lsquare.cpp
@@ -1585,7 +1585,7 @@ truth lsquare::Duplicate(const beamdata&
character* Character = GetCharacter();
if(Character)
- DuplicatedSomething = truth(Character->DuplicateToNearestSquare(Beam.Owner, Beam.SpecialParameters));
+ DuplicatedSomething = truth(Character->DuplicateToNearestSquare(Beam.Owner, Beam.SpecialParameters) != NULL);
if(GetStack()->Duplicate(DuplicatedSomething ? 4 : 5, Beam.SpecialParameters))
DuplicatedSomething = true;
@@ -2186,8 +2186,8 @@ void lsquare::SpillFluid(character* Spil
Spiller->Hostility(GetCharacter());
long CharVolume = GetCharacter()->GetVolume();
- double ChanceMultiplier = 1. / (300 + sqrt(GetStack()->GetVolume() + CharVolume));
- double Root = sqrt(CharVolume);
+ double ChanceMultiplier = 1. / (300 + sqrt((double)(GetStack()->GetVolume() + CharVolume)));
+ double Root = sqrt((double)CharVolume);
if(ForceHit || Root > RAND() % 400 || Root > RAND() % 400)
{