[wpdev-commits] wolfpack basechar.cpp,1.153,1.154 wolfpack.vcproj,1.50,1.51
Brought to you by:
rip,
thiagocorrea
From: Sebastian H. <dar...@us...> - 2004-09-30 12:23:14
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12652 Modified Files: basechar.cpp wolfpack.vcproj Log Message: Compile fixes. Blood color. Index: wolfpack.vcproj =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolfpack.vcproj,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** wolfpack.vcproj 18 Sep 2004 21:10:40 -0000 1.50 --- wolfpack.vcproj 30 Sep 2004 12:23:03 -0000 1.51 *************** *** 168,175 **** PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;QT_THREAD_SUPPORT;QT_LITE_COMPONENT;QT_DLL;QT_NO_STL;QT_NO_COMPRESS;CRASHHANDLER;MYSQL_DRIVER" StringPooling="TRUE" ! MinimalRebuild="FALSE" BasicRuntimeChecks="0" RuntimeLibrary="2" ! StructMemberAlignment="3" BufferSecurityCheck="FALSE" EnableFunctionLevelLinking="FALSE" --- 168,175 ---- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;QT_THREAD_SUPPORT;QT_LITE_COMPONENT;QT_DLL;QT_NO_STL;QT_NO_COMPRESS;CRASHHANDLER;MYSQL_DRIVER" StringPooling="TRUE" ! MinimalRebuild="TRUE" BasicRuntimeChecks="0" RuntimeLibrary="2" ! StructMemberAlignment="0" BufferSecurityCheck="FALSE" EnableFunctionLevelLinking="FALSE" *************** *** 179,183 **** UsePrecompiledHeader="0" BrowseInformation="1" ! WarningLevel="0" Detect64BitPortabilityProblems="FALSE" DebugInformationFormat="3"/> --- 179,183 ---- UsePrecompiledHeader="0" BrowseInformation="1" ! WarningLevel="1" Detect64BitPortabilityProblems="FALSE" DebugInformationFormat="3"/> Index: basechar.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/basechar.cpp,v retrieving revision 1.153 retrieving revision 1.154 diff -C2 -d -r1.153 -r1.154 *** basechar.cpp 27 Sep 2004 15:51:32 -0000 1.153 --- basechar.cpp 30 Sep 2004 12:23:03 -0000 1.154 *************** *** 2342,2376 **** } ! // There is a 33% chance that blood is created on hit by phsical means if ( type == DAMAGE_PHYSICAL && !RandomNum( 0, 2 ) ) { ! P_ITEM blood = 0; ! ! // If more than 50% of the maximum healthpoints has been dealt as damage ! // we display a big puddle of blood ! if ( amount >= maxHitpoints_ * 0.50 ) ! { ! blood = cItem::createFromList( "BIG_BLOOD_PUDDLES" ); ! // Otherwise we display a medium puddle of blood if the damage is greater ! // than 25% of the maximum healthpoints } - else if ( amount >= maxHitpoints_ * 0.35 ) - { - blood = cItem::createFromList( "MEDIUM_BLOOD_PUDDLES" ); ! // at last we only display a small stain of blood if the damage has been ! // greater than 10% of the maximum hitpoints ! } ! else if ( amount >= maxHitpoints_ * 0.20 ) ! { ! blood = cItem::createFromList( "SMALL_BLOOD_PUDDLES" ); ! } ! if ( blood ) ! { ! blood->moveTo( pos_ ); // Move it to the feet of the victim ! blood->setNoDecay( false ); // Override the nodecay tag in the definitions ! blood->update(); // Send it to all sockets in range } } --- 2342,2385 ---- } ! // There is a 33% chance that blood is created on hit by phsical means if ( type == DAMAGE_PHYSICAL && !RandomNum( 0, 2 ) ) { ! int bloodColor = 0; ! if (basedef_) { ! bloodColor = (int)basedef_->getIntProperty("bloodcolor", 0); } ! if (bloodColor != -1) { ! P_ITEM blood = 0; ! // If more than 50% of the maximum healthpoints has been dealt as damage ! // we display a big puddle of blood ! if ( amount >= maxHitpoints_ * 0.50 ) ! { ! blood = cItem::createFromList( "BIG_BLOOD_PUDDLES" ); ! ! // Otherwise we display a medium puddle of blood if the damage is greater ! // than 25% of the maximum healthpoints ! } ! else if ( amount >= maxHitpoints_ * 0.35 ) ! { ! blood = cItem::createFromList( "MEDIUM_BLOOD_PUDDLES" ); ! ! // at last we only display a small stain of blood if the damage has been ! // greater than 10% of the maximum hitpoints ! } ! else if ( amount >= maxHitpoints_ * 0.20 ) ! { ! blood = cItem::createFromList( "SMALL_BLOOD_PUDDLES" ); ! } ! ! if ( blood ) ! { ! blood->setColor(bloodColor); ! blood->setNoDecay( false ); // Override the nodecay tag in the definitions ! blood->moveTo( pos_ ); // Move it to the feet of the victim ! blood->update(); // Send it to all sockets in range ! } } } |