- Fixed FIFO defines in TURBO mode.
Ref: http://www.eathena.ws/board/index.php?showtopic=129766 The rest of the TURBO related errors are about the HEAD defines having to be at the start of a block because they contain a variable declaration. (i won't fix these) git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9611 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
ed74a4c9c7
commit
129bff5fb6
@ -4,6 +4,7 @@ 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.
|
||||||
|
|
||||||
2007/01/03
|
2007/01/03
|
||||||
|
* Fixed TURBO FIFO defines.
|
||||||
* Moved refusal of a known packet versions to clif_parse_WantToConnection
|
* Moved refusal of a known packet versions to clif_parse_WantToConnection
|
||||||
and made it check for non-player object with that id.
|
and made it check for non-player object with that id.
|
||||||
* JK_JOINTBEAT as described in:
|
* JK_JOINTBEAT as described in:
|
||||||
|
@ -655,7 +655,7 @@ int do_sendrecv(int next)
|
|||||||
free_session_mem(i); //free the bad session
|
free_session_mem(i); //free the bad session
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!FD_ISSET(i, &readfds))
|
if (!FD_ISSET(i, &readfds))
|
||||||
FD_SET(i,&readfds);
|
FD_SET(i,&readfds);
|
||||||
ret = i;
|
ret = i;
|
||||||
|
@ -23,11 +23,13 @@ extern time_t last_tick;
|
|||||||
extern time_t stall_time;
|
extern time_t stall_time;
|
||||||
|
|
||||||
// define declaration
|
// define declaration
|
||||||
|
#define TURBO
|
||||||
|
|
||||||
#define RFIFOSPACE(fd) (session[fd]->max_rdata-session[fd]->rdata_size)
|
#define RFIFOSPACE(fd) (session[fd]->max_rdata-session[fd]->rdata_size)
|
||||||
#ifdef TURBO
|
#ifdef TURBO
|
||||||
#define RFIFOHEAD(fd) char *rbPtr ## fd = session[fd]->rdata+session[fd]->rdata_pos
|
#define RFIFOVAR(fd) rbPtr ## fd
|
||||||
#define RFIFOP(fd,pos) (&rbPtr ## fd[pos])
|
#define RFIFOHEAD(fd) uint8 *RFIFOVAR(fd) = session[fd]->rdata+session[fd]->rdata_pos
|
||||||
|
#define RFIFOP(fd,pos) ( &RFIFOVAR(fd) + (pos) )
|
||||||
#else
|
#else
|
||||||
//Make it a comment so it does not disrupts the rest of code.
|
//Make it a comment so it does not disrupts the rest of code.
|
||||||
#define RFIFOHEAD(fd) //
|
#define RFIFOHEAD(fd) //
|
||||||
@ -58,8 +60,9 @@ extern time_t stall_time;
|
|||||||
|
|
||||||
#define WFIFOSPACE(fd) (session[fd]->max_wdata-session[fd]->wdata_size)
|
#define WFIFOSPACE(fd) (session[fd]->max_wdata-session[fd]->wdata_size)
|
||||||
#ifdef TURBO
|
#ifdef TURBO
|
||||||
#define WFIFOHEAD(fd, x) uint8 *wbPtr ## fd = (fd>0&&session[fd])?(session[fd]->wdata+session[fd]->wdata_size):NULL;
|
#define WFIFOVAR(fd) wbPtr ## fd
|
||||||
#define WFIFOP(fd,pos) (&wbPtr ## fd[pos])
|
#define WFIFOHEAD(fd, x) uint8 *WFIFOVAR(fd) = ( (fd) > 0 && session[fd] ? session[fd]->wdata+session[fd]->wdata_size : NULL )
|
||||||
|
#define WFIFOP(fd,pos) ( &WFIFOVAR(fd) + (pos) )
|
||||||
#else
|
#else
|
||||||
#define WFIFOHEAD(fd, size) do{ if((fd) && session[fd]->wdata_size + (size) > session[fd]->max_wdata ) realloc_writefifo(fd, size); }while(0)
|
#define WFIFOHEAD(fd, size) do{ if((fd) && session[fd]->wdata_size + (size) > session[fd]->max_wdata ) realloc_writefifo(fd, size); }while(0)
|
||||||
|
|
||||||
|
@ -5011,13 +5011,13 @@ int atcommand_kickall(
|
|||||||
nullpo_retr(-1, sd);
|
nullpo_retr(-1, sd);
|
||||||
|
|
||||||
pl_allsd = map_getallusers(&users);
|
pl_allsd = map_getallusers(&users);
|
||||||
|
|
||||||
for (i = 0; i < users; i++) {
|
for (i = 0; i < users; i++) {
|
||||||
if ((pl_sd = pl_allsd[i]) && pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can kick only lower or same gm level
|
if ((pl_sd = pl_allsd[i]) && pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can kick only lower or same gm level
|
||||||
if (sd->status.account_id != pl_sd->status.account_id)
|
if (sd->status.account_id != pl_sd->status.account_id)
|
||||||
clif_GM_kick(sd, pl_sd, 0);
|
clif_GM_kick(sd, pl_sd, 0);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
clif_displaymessage(fd, msg_txt(195)); // All players have been kicked!
|
clif_displaymessage(fd, msg_txt(195)); // All players have been kicked!
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ static const int packet_len_table[]={
|
|||||||
};
|
};
|
||||||
|
|
||||||
extern int char_fd; // inter serverのfdはchar_fdを使う
|
extern int char_fd; // inter serverのfdはchar_fdを使う
|
||||||
#define inter_fd (char_fd) // エイリアス
|
#define inter_fd char_fd // エイリアス
|
||||||
|
|
||||||
//-----------------------------------------------------------------
|
//-----------------------------------------------------------------
|
||||||
// inter serverへの送信
|
// inter serverへの送信
|
||||||
|
@ -1871,7 +1871,7 @@ static int map_getallpc_sub(DBKey key,void * data,va_list ap)
|
|||||||
struct map_session_data** map_getallusers(int *users) {
|
struct map_session_data** map_getallusers(int *users) {
|
||||||
static struct map_session_data **all_sd=NULL;
|
static struct map_session_data **all_sd=NULL;
|
||||||
static unsigned int all_count = 0;
|
static unsigned int all_count = 0;
|
||||||
|
|
||||||
if (users == NULL)
|
if (users == NULL)
|
||||||
{ //Free up data
|
{ //Free up data
|
||||||
if (all_sd) aFree(all_sd);
|
if (all_sd) aFree(all_sd);
|
||||||
|
12
src/map/pc.c
12
src/map/pc.c
@ -4851,13 +4851,13 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
|
|||||||
if(sd->duel_invite > 0)
|
if(sd->duel_invite > 0)
|
||||||
duel_reject(sd->duel_invite, sd);
|
duel_reject(sd->duel_invite, sd);
|
||||||
}
|
}
|
||||||
|
|
||||||
pc_setdead(sd);
|
pc_setdead(sd);
|
||||||
//Reset ticks.
|
//Reset ticks.
|
||||||
sd->hp_loss_tick = sd->sp_loss_tick = 0;
|
sd->hp_loss_tick = sd->sp_loss_tick = 0;
|
||||||
|
|
||||||
pc_setglobalreg(sd,"PC_DIE_COUNTER",++sd->die_counter);
|
pc_setglobalreg(sd,"PC_DIE_COUNTER",++sd->die_counter);
|
||||||
|
|
||||||
if (sd->state.event_death){
|
if (sd->state.event_death){
|
||||||
if(!src)
|
if(!src)
|
||||||
pc_setglobalreg(sd, "killerrid", 0);
|
pc_setglobalreg(sd, "killerrid", 0);
|
||||||
@ -4865,7 +4865,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
|
|||||||
pc_setglobalreg(sd,"killerrid",src->id);
|
pc_setglobalreg(sd,"killerrid",src->id);
|
||||||
npc_script_event(sd,NPCE_DIE);
|
npc_script_event(sd,NPCE_DIE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( sd && sd->spiritball && (sd->class_&MAPID_BASEMASK)==MAPID_GUNSLINGER ) // maybe also monks' spiritballs ?
|
if ( sd && sd->spiritball && (sd->class_&MAPID_BASEMASK)==MAPID_GUNSLINGER ) // maybe also monks' spiritballs ?
|
||||||
pc_delspiritball(sd,sd->spiritball,0);
|
pc_delspiritball(sd,sd->spiritball,0);
|
||||||
|
|
||||||
@ -4900,7 +4900,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
|
|||||||
ssd->status.manner -= 5;
|
ssd->status.manner -= 5;
|
||||||
if(ssd->status.manner < 0)
|
if(ssd->status.manner < 0)
|
||||||
sc_start(src,SC_NOCHAT,100,0,0);
|
sc_start(src,SC_NOCHAT,100,0,0);
|
||||||
|
|
||||||
// PK/Karma system code (not enabled yet) [celest]
|
// PK/Karma system code (not enabled yet) [celest]
|
||||||
// originally from Kade Online, so i don't know if any of these is correct ^^;
|
// originally from Kade Online, so i don't know if any of these is correct ^^;
|
||||||
// note: karma is measured REVERSE, so more karma = more 'evil' / less honourable,
|
// note: karma is measured REVERSE, so more karma = more 'evil' / less honourable,
|
||||||
@ -4926,7 +4926,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// PK/Karma system code (not enabled yet) [celest]
|
// PK/Karma system code (not enabled yet) [celest]
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user