summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-11-20 20:50:50 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-11-20 20:50:50 +0000
commit437643c4a0cfc8c79439b3523bdc014076ad929c (patch)
tree55b228756e5463d45a82c45515dcee7457d8cb74 /src/map/script.c
parent6fa92268db65735f1edbfea68d80a81fce2fe503 (diff)
downloadhercules-437643c4a0cfc8c79439b3523bdc014076ad929c.tar.gz
hercules-437643c4a0cfc8c79439b3523bdc014076ad929c.tar.bz2
hercules-437643c4a0cfc8c79439b3523bdc014076ad929c.tar.xz
hercules-437643c4a0cfc8c79439b3523bdc014076ad929c.zip
Added setting of state.speed_changed in script function 'npcspeed'.
Should fix the walking npc display problem (bugreport:2434). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13378 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 4091a4081..127ebcde1 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -10995,13 +10995,16 @@ BUILDIN_FUNC(npctalk)
// change npc walkspeed [Valaris]
BUILDIN_FUNC(npcspeed)
{
- struct npc_data *nd=(struct npc_data *)map_id2bl(st->oid);
- int x=0;
+ struct npc_data* nd;
+ int speed;
- x=script_getnum(st,2);
+ speed = script_getnum(st,2);
+ nd =(struct npc_data *)map_id2bl(st->oid);
- if(nd) {
- nd->speed=x;
+ if( nd )
+ {
+ nd->speed = speed;
+ nd->ud.state.speed_changed = 1;
}
return 0;