Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv28426
Modified Files:
basics.h combat.cpp wolf.dsp
Log Message:
Had to rename destroy to destroy_object because of a naming clash with std::destroy in some cases (STLPort)
Index: basics.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basics.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** basics.h 19 Sep 2003 20:41:08 -0000 1.17
--- basics.h 19 Sep 2003 22:02:41 -0000 1.18
***************
*** 86,91 ****
unsigned int getNormalizedTime();
! template<class T>
! struct destroy : std::unary_function<T, void> {
void operator()(T& d) const
{
--- 86,90 ----
unsigned int getNormalizedTime();
! template<class T> struct destroy_obj : std::unary_function<T, void> {
void operator()(T& d) const
{
Index: combat.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/combat.cpp,v
retrieving revision 1.153
retrieving revision 1.154
diff -C2 -d -r1.153 -r1.154
*** combat.cpp 17 Sep 2003 19:15:33 -0000 1.153
--- combat.cpp 19 Sep 2003 22:02:41 -0000 1.154
***************
*** 835,844 ****
if( !pDefender || pDefender->free || pDefender->isHidden() || pDefender->isDead() )
{
! pAttacker->setNextHitTime(0);
if( pDefender )
! pDefender->setAttackerSerial(INVALID_SERIAL);
! pAttacker->setCombatTarget(INVALID_SERIAL);
pAttacker->setAttackFirst( false );
!
// Reset the target
if( pAttacker->objectType() == enPlayer )
--- 835,844 ----
if( !pDefender || pDefender->free || pDefender->isHidden() || pDefender->isDead() )
{
! pAttacker->setNextHitTime( 0 );
if( pDefender )
! pDefender->setAttackerSerial( INVALID_SERIAL );
! pAttacker->setCombatTarget( INVALID_SERIAL );
pAttacker->setAttackFirst( false );
!
// Reset the target
if( pAttacker->objectType() == enPlayer )
***************
*** 852,904 ****
}
}
-
return;
}
- // Some special stuff for guards
- if( pAttacker->objectType() == enNPC && !pAttacker->inRange( pDefender, SrvParams->attack_distance() ) )
- {
- // Guards beam to their target if they are out of range
- #pragma message("reimplement with new npc ai!")
- /* if( pAttacker->npcaitype() == 4 && pDefender->inGuardedArea() )
- {
- pAttacker->removeFromView( false );
- pAttacker->moveTo( pDefender->pos() );
- pAttacker->resend( false );
-
- pAttacker->soundEffect( 0x1FE );
- pAttacker->effect( 0x372A, 0x09, 0x06 );
-
- if( RandomNum( 1, 4 ) == 1 )
- pAttacker->talk( tr("Halt, scoundrel!"), -1, 0, true );
- }
- // If we are out of close range, get out of warmode and stop fighting
- else if( pAttacker->npcaitype() != 4 )
- {
- pAttacker->setCombatTarget( INVALID_SERIAL );
- pAttacker->setSwingTarget( INVALID_SERIAL );
- pAttacker->setNextHitTime(0);
-
- P_CHAR pc = FindCharBySerial( pAttacker->attacker() );
-
- if( pc )
- {
- pc->setAttackFirst( false );
- pc->setAttackerSerial(INVALID_SERIAL);
- }
-
- pAttacker->setAttackerSerial(INVALID_SERIAL);
- pAttacker->setAttackFirst( false );
-
- // We have been at war for sure, so we can
- // update without harm
- pAttacker->setWar( false );
- pAttacker->update();
-
- return;
- }
- */
- }
-
// We have two delay-timers for attacking
// Timer for melee weapons and for
--- 852,858 ----
***************
*** 917,921 ****
--- 871,881 ----
// Only shot if our "head" can see the opponent
if( !pAttacker->pos().lineOfSight( pDefender->pos() ) )
+ {
+ /*
+ This function get's hammerd
+ Maybe a 100 ms delay would be appropiate
+ */
mayAttack = false;
+ }
}
// For other Combat Skills it's enough to stand near the opponent
***************
*** 1324,1335 ****
return;
- // pGuard->setNpcAIType( 4 );
pGuard->setAttackFirst( true );
pGuard->setAttackerSerial(pOffender->serial());
pGuard->setCombatTarget(pOffender->serial());
- // pGuard->setWanderType( enCombatTarget );
pGuard->toggleCombat();
pGuard->setNextMoveTime();
! pGuard->setSummonTime( ( uiCurrentTime + (MY_CLOCKS_PER_SEC*25) ) );
pGuard->soundEffect( 0x1FE );
--- 1284,1293 ----
return;
pGuard->setAttackFirst( true );
pGuard->setAttackerSerial(pOffender->serial());
pGuard->setCombatTarget(pOffender->serial());
pGuard->toggleCombat();
pGuard->setNextMoveTime();
! pGuard->setSummonTime( ( uiCurrentTime + (MY_CLOCKS_PER_SEC*25) ) );
pGuard->soundEffect( 0x1FE );
Index: wolf.dsp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolf.dsp,v
retrieving revision 1.234
retrieving revision 1.235
diff -C2 -d -r1.234 -r1.235
*** wolf.dsp 19 Sep 2003 20:41:08 -0000 1.234
--- wolf.dsp 19 Sep 2003 22:02:41 -0000 1.235
***************
*** 1,23 ****
# Microsoft Developer Studio Project File - Name="wolf" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
! # ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=wolf - Win32 Debug
! !MESSAGE This is not a valid makefile. To build this project using NMAKE,
! !MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "wolf.mak".
!MESSAGE
! !MESSAGE You can specify a configuration when running NMAKE
! !MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "wolf.mak" CFG="wolf - Win32 Debug"
!MESSAGE
! !MESSAGE Possible choices for configuration are:
!MESSAGE
! !MESSAGE "wolf - Win32 Release" (based on "Win32 (x86) Console Application")
! !MESSAGE "wolf - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
--- 1,23 ----
# Microsoft Developer Studio Project File - Name="wolf" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
! # ** NICHT BEARBEITEN **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=wolf - Win32 Debug
! !MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
! !MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl
!MESSAGE
!MESSAGE NMAKE /f "wolf.mak".
!MESSAGE
! !MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
! !MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
!MESSAGE
!MESSAGE NMAKE /f "wolf.mak" CFG="wolf - Win32 Debug"
!MESSAGE
! !MESSAGE Für die Konfiguration stehen zur Auswahl:
!MESSAGE
! !MESSAGE "wolf - Win32 Release" (basierend auf "Win32 (x86) Console Application")
! !MESSAGE "wolf - Win32 Debug" (basierend auf "Win32 (x86) Console Application")
!MESSAGE
***************
*** 52,56 ****
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
! # ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib ws2_32.lib $(QTDIR)\lib\qt-mt312.lib shell32.lib /nologo /subsystem:windows /map /machine:I386 /out:"c:\wolfpack\wolfpack.exe" /libpath:"lib\ZThread\lib" /libpath:"lib\Python\lib" /libpath:"lib\bugreport\lib" /libpath:"flatstore\Release" /opt:ref /opt:nowin98
# SUBTRACT LINK32 /pdb:none
--- 52,56 ----
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
! # ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib ws2_32.lib $(QTDIR)\lib\qt-mt320.lib shell32.lib /nologo /subsystem:windows /map /machine:I386 /out:"c:\wolfpack\wolfpack.exe" /libpath:"lib\ZThread\lib" /libpath:"lib\Python\lib" /libpath:"lib\bugreport\lib" /libpath:"flatstore\Release" /opt:ref /opt:nowin98
# SUBTRACT LINK32 /pdb:none
|