* Added a check to make sure only released timers are acquired from the free list.

* Changed TIMER_MAX_INTERVAL to 1 second (was set to 1 minute by mistake).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12963 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
FlavioJS 2008-07-16 10:34:16 +00:00
parent dde58291e4
commit 3f7b407d6d
2 changed files with 5 additions and 3 deletions

View File

@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2008/07/16 2008/07/16
* Added a check to make sure only released timers are acquired from the free list.
* Changed TIMER_MAX_INTERVAL to 1 second (was set to 1 minute by mistake). [FlavioJS]
* Fixed TK_JUMPKICK, should not jump over objects and cliffs. * Fixed TK_JUMPKICK, should not jump over objects and cliffs.
- This also might fix them being able to jump barricades on WoESE. [Brainstorm] - This also might fix them being able to jump barricades on WoESE. [Brainstorm]

View File

@ -22,7 +22,7 @@
// If the server can't handle processing thousands of monsters // If the server can't handle processing thousands of monsters
// or many connected clients, please increase TIMER_MIN_INTERVAL. // or many connected clients, please increase TIMER_MIN_INTERVAL.
#define TIMER_MIN_INTERVAL 50 #define TIMER_MIN_INTERVAL 50
#define TIMER_MAX_INTERVAL 60000 #define TIMER_MAX_INTERVAL 1000
// timers (array) // timers (array)
static struct TimerData* timer_data = NULL; static struct TimerData* timer_data = NULL;
@ -324,8 +324,8 @@ static int acquire_timer(void)
while( free_timer_list_num ) while( free_timer_list_num )
{ {
int pos = --free_timer_list_num; int pos = --free_timer_list_num;
if( free_timer_list[pos] < timer_data_num ) if( free_timer_list[pos] < timer_data_num && timer_data[free_timer_list[pos]].type == 0 )
{ {// freed and released
tid = free_timer_list[pos]; tid = free_timer_list[pos];
break; break;
} }