From df87bc06c2ae0bf0829acc6355c07f592408cc37 Mon Sep 17 00:00:00 2001 From: Lukasz Wlasinksi Date: Thu, 12 May 2005 10:28:40 +0000 Subject: [PATCH] fixed "dod_set_stamina" native --- dlls/dod2/dodfun/moduleconfig.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/dod2/dodfun/moduleconfig.cpp b/dlls/dod2/dodfun/moduleconfig.cpp index f803d010..518a9223 100755 --- a/dlls/dod2/dodfun/moduleconfig.cpp +++ b/dlls/dod2/dodfun/moduleconfig.cpp @@ -94,10 +94,10 @@ void PlayerPreThink_Post( edict_t *pEntity ) { CPlayer *pPlayer = GET_PLAYER_POINTER(pEntity); if ( pPlayer->staminaSet ) { - if ( pEntity->v.iuser4 > pPlayer->staminaMax ) - pEntity->v.iuser4 = pPlayer->staminaMax; - else if ( pEntity->v.iuser4 < pPlayer->staminaMin ) - pEntity->v.iuser4 = pPlayer->staminaMin; + if ( (int)pEntity->v.fuser4 > pPlayer->staminaMax ) + pEntity->v.fuser4 = (float)pPlayer->staminaMax; + else if ( (int)pEntity->v.fuser4 < pPlayer->staminaMin ) + pEntity->v.fuser4 = (float)pPlayer->staminaMin; } RETURN_META(MRES_IGNORED);