Well, I have some probleme with my @speed commande and I really don't understand why : when I @speed someone, when his speed is recaculate => it becomes 0.
So, for some event you want to slow the player, they unequip a item => they are like flash.
(I tryed some things, so I think it's easier to read with some spoiler, you can have a resume just reading the tilte.) 1) Changing status_calc_pc_
I'm in the last SVN and I decided to understand how it could happen, I saw the beuatifull diea of permanent_speed and this in status.c : function : status_calc_pc_ :
//FIXME: Most of these stuff should be calculated once, but how do I fix the memset above to do that? [Skotlex]
if (!sd->state.permanent_speed)
status->speed = DEFAULT_WALK_SPEED;
And I changed to a previous version :
//FIXME: Most of these stuff should be calculated once, but how do I fix the memset above to do that? [Skotlex]
status->speed = DEFAULT_WALK_SPEED;
Now, it automatically go to the default_walk_speed on unequip/change map/level up ect, which is quite logical.
=> I replaced the test where it should be.
2) Changing status_calc_speed
So I searched somewhere else with a test like if(sd->state.permanent_speed) and there is only another :
if (sd && sd->state.permanent_speed)
return (short)cap_value(speed,10,USHRT_MAX);
I tryed to del it, nothing happened IG => always max speed up after unequip a item.
3) Trying another thing in status_calc_pc_
Well, so, I replaced it and tryed this :
if (!sd->state.permanent_speed)
status->speed = DEFAULT_WALK_SPEED;
else
status->speed = 500;
One more time, obvisouly, I go to slow motion when I use speed and unequip a item.
Let's try this :
if (!sd->state.permanent_speed)
status->speed = DEFAULT_WALK_SPEED;
else
status->speed = sd->base_status.speed;
And it change nothing, cause :
status = &sd->base_status;
status is pointing on the player speed already !
So, I don't understand why my speed is already fucked up before going into status_calc_pc_ :/.
4) Retard mode in speed atcommand
Well, I'm going to full retard mode :
if (speed < 0) {
sd->base_status.speed = DEFAULT_WALK_SPEED;
sd->state.permanent_speed = 0; // Remove lock when set back to default speed.
} else {
sd->base_status.speed = cap_value(speed, MIN_WALK_SPEED, MAX_WALK_SPEED);
sd->state.permanent_speed = 1; // Set lock when set to non-default speed.
}
=>
if (speed < 0) {
sd->base_status.speed = DEFAULT_WALK_SPEED;
sd->state.permanent_speed = 0; // Remove lock when set back to default speed.
} else {
sd->base_status.speed = 500;
sd->state.permanent_speed = 1; // Set lock when set to non-default speed.
}
Slow motion, but still hyper fast on unequip...
5) Changing status_change_start to know if it's this function that fuck up my speed
which is jsut resulting on a perma 300, obvisouly.
Well, to conclude, I really don't understand, I made a perfect circle, and I gave you nearly all the things I tryed to exclude some idea and to prove that I really tryed myself.
Question
Kreustoo
Hi,
Well, I have some probleme with my @speed commande and I really don't understand why : when I @speed someone, when his speed is recaculate => it becomes 0.
So, for some event you want to slow the player, they unequip a item => they are like flash.
(I tryed some things, so I think it's easier to read with some spoiler, you can have a resume just reading the tilte.)
1) Changing status_calc_pc_
I'm in the last SVN and I decided to understand how it could happen, I saw the beuatifull diea of permanent_speed and this in status.c : function : status_calc_pc_ :
And I changed to a previous version :
Now, it automatically go to the default_walk_speed on unequip/change map/level up ect, which is quite logical.
=> I replaced the test where it should be.
2) Changing status_calc_speed
So I searched somewhere else with a test like if(sd->state.permanent_speed) and there is only another :
I tryed to del it, nothing happened IG => always max speed up after unequip a item.
3) Trying another thing in status_calc_pc_
Well, so, I replaced it and tryed this :
One more time, obvisouly, I go to slow motion when I use speed and unequip a item.
Let's try this :
And it change nothing, cause :
status is pointing on the player speed already !
So, I don't understand why my speed is already fucked up before going into status_calc_pc_ :/.
4) Retard mode in speed atcommand
Well, I'm going to full retard mode :
=>
Slow motion, but still hyper fast on unequip...
5) Changing status_change_start to know if it's this function that fuck up my speed
To :
To be perfectly honnest, I really didn't know what would happen there, so IG :
-When I speed 1 I go to 500
-When I speed 100 I go to 100
Woot ?
Let's try this :
Ultra speed mode unlocked, I'm nearly teleporting where I want to go.
So it seems there is something with this function, but, I don't really understand what is happening there, so, maybe, I'm just totally wrong.
6) Changing status_change_start in retard mode
Well : retard mode :
Let's randomly quote this => hypersonic mode teleporting
Okaayyy, so, the prob is maybe in status_calc_speed... Which is my 2nd test... I tryed some weird things like this :
which is jsut resulting on a perma 300, obvisouly.
Well, to conclude, I really don't understand, I made a perfect circle, and I gave you nearly all the things I tryed to exclude some idea and to prove that I really tryed myself.
If someone can help me :/.
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.