Fixed a crash when a taekwon hits a wall while Sprinting (bugreport:483)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11795 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
d4ea436e0b
commit
cd3307a4bc
@ -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/11/24
|
2007/11/24
|
||||||
|
* Fixed a crash when a taekwon hits a wall while Sprinting (bugreport:483)
|
||||||
* Added support for latest official client/server packet changes [ultramage]
|
* Added support for latest official client/server packet changes [ultramage]
|
||||||
- enable by setting PACKETVER to 9; note that this breaks older clients
|
- enable by setting PACKETVER to 9; note that this breaks older clients
|
||||||
2007/11/23
|
2007/11/23
|
||||||
|
@ -402,6 +402,7 @@ int unit_run(struct block_list *bl)
|
|||||||
{
|
{
|
||||||
struct status_change *sc = status_get_sc(bl);
|
struct status_change *sc = status_get_sc(bl);
|
||||||
short to_x,to_y,dir_x,dir_y;
|
short to_x,to_y,dir_x,dir_y;
|
||||||
|
int lv;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!(sc && sc->data[SC_RUN]))
|
if (!(sc && sc->data[SC_RUN]))
|
||||||
@ -412,11 +413,13 @@ int unit_run(struct block_list *bl)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
to_x = bl->x;
|
lv = sc->data[SC_RUN]->val1;
|
||||||
to_y = bl->y;
|
|
||||||
dir_x = dirx[sc->data[SC_RUN]->val2];
|
dir_x = dirx[sc->data[SC_RUN]->val2];
|
||||||
dir_y = diry[sc->data[SC_RUN]->val2];
|
dir_y = diry[sc->data[SC_RUN]->val2];
|
||||||
|
|
||||||
|
// determine destination cell
|
||||||
|
to_x = bl->x;
|
||||||
|
to_y = bl->y;
|
||||||
for(i=0;i<AREA_SIZE;i++)
|
for(i=0;i<AREA_SIZE;i++)
|
||||||
{
|
{
|
||||||
if(!map_getcell(bl->m,to_x+dir_x,to_y+dir_y,CELL_CHKPASS))
|
if(!map_getcell(bl->m,to_x+dir_x,to_y+dir_y,CELL_CHKPASS))
|
||||||
@ -429,7 +432,7 @@ int unit_run(struct block_list *bl)
|
|||||||
//If you can't run forward, you must be next to a wall, so bounce back. [Skotlex]
|
//If you can't run forward, you must be next to a wall, so bounce back. [Skotlex]
|
||||||
clif_status_change(bl, SI_BUMP, 1);
|
clif_status_change(bl, SI_BUMP, 1);
|
||||||
status_change_end(bl,SC_RUN,-1);
|
status_change_end(bl,SC_RUN,-1);
|
||||||
skill_blown(bl,bl,skill_get_blewcount(TK_RUN,sc->data[SC_RUN]->val1),unit_getdir(bl),0);
|
skill_blown(bl,bl,skill_get_blewcount(TK_RUN,lv),unit_getdir(bl),0);
|
||||||
clif_fixpos(bl); //Why is a clif_slide (skill_blown) AND a fixpos needed? Ask Aegis.
|
clif_fixpos(bl); //Why is a clif_slide (skill_blown) AND a fixpos needed? Ask Aegis.
|
||||||
clif_status_change(bl, SI_BUMP, 0);
|
clif_status_change(bl, SI_BUMP, 0);
|
||||||
return 0;
|
return 0;
|
||||||
@ -445,7 +448,7 @@ int unit_run(struct block_list *bl)
|
|||||||
// copy-paste from above
|
// copy-paste from above
|
||||||
clif_status_change(bl, SI_BUMP, 1);
|
clif_status_change(bl, SI_BUMP, 1);
|
||||||
status_change_end(bl,SC_RUN,-1);
|
status_change_end(bl,SC_RUN,-1);
|
||||||
skill_blown(bl,bl,skill_get_blewcount(TK_RUN,sc->data[SC_RUN]->val1),unit_getdir(bl),0);
|
skill_blown(bl,bl,skill_get_blewcount(TK_RUN,lv),unit_getdir(bl),0);
|
||||||
clif_fixpos(bl);
|
clif_fixpos(bl);
|
||||||
clif_status_change(bl, SI_BUMP, 0);
|
clif_status_change(bl, SI_BUMP, 0);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user