mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
- code cleanup mostly from Brent Johnson (Nonomori), a very few from me
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@508 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+2
-2
@@ -2222,7 +2222,7 @@ UINT8 CalculateObjectWeight( OBJECTTYPE *pObject )
|
||||
{
|
||||
//Pulmu:
|
||||
//Temporary calculation for minWeight
|
||||
UINT32 uiMinWeight = (Item[ pObject->usGunAmmoItem].ubWeight / 5.0) + 0.5;
|
||||
UINT32 uiMinWeight = (UINT32)((Item[ pObject->usGunAmmoItem].ubWeight / 5.0) + 0.5);
|
||||
if( uiMinWeight < 1 || uiMinWeight > Item[ pObject->usGunAmmoItem].ubWeight)
|
||||
{
|
||||
uiMinWeight = 1;
|
||||
@@ -2248,7 +2248,7 @@ UINT8 CalculateObjectWeight( OBJECTTYPE *pObject )
|
||||
{
|
||||
usWeight = 0;
|
||||
//Temporary calculation for minWeight. 0.2*ubWeight rounded correctly
|
||||
UINT32 uiMinWeight = (Item[pObject->usItem].ubWeight / 5.0) + 0.5;
|
||||
UINT32 uiMinWeight = (UINT32)((Item[pObject->usItem].ubWeight / 5.0) + 0.5);
|
||||
if( uiMinWeight < 1 || uiMinWeight > Item[pObject->usItem].ubWeight)
|
||||
{
|
||||
uiMinWeight = 1;
|
||||
|
||||
Reference in New Issue
Block a user