summaryrefslogtreecommitdiff
path: root/src/map/chrif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-03 19:46:43 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-03 19:46:43 +0000
commit60c165d6caa0ae9f93240f17db02580d30281caa (patch)
treedfb04f4cb47bd549f4276ee6ee776a3c45d4b142 /src/map/chrif.c
parentb6cb7738945e8655a4bd94b5f37615058d068638 (diff)
downloadhercules-60c165d6caa0ae9f93240f17db02580d30281caa.tar.gz
hercules-60c165d6caa0ae9f93240f17db02580d30281caa.tar.bz2
hercules-60c165d6caa0ae9f93240f17db02580d30281caa.tar.xz
hercules-60c165d6caa0ae9f93240f17db02580d30281caa.zip
- Removed sd->sex since it's redundant (we can always use sd->status.sex)
- If somehow a player logs out and it's saved with 0 hp, on login his state will be set to dead as well so he can respawn (otherwise that leads to a stuck char) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9398 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/chrif.c')
-rw-r--r--src/map/chrif.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c
index b11640b74..95b874327 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -863,13 +863,8 @@ int chrif_changedsex(int fd)
sd = map_id2sd(acc);
if (acc > 0) {
if (sd != NULL && sd->status.sex != sex) {
- if (sd->status.sex == 0) {
- sd->status.sex = 1;
- sd->sex = 1;
- } else if (sd->status.sex == 1) {
- sd->status.sex = 0;
- sd->sex = 0;
- }
+ sd->status.sex = !sd->status.sex;
+
// to avoid any problem with equipment and invalid sex, equipment is unequiped.
for (i = 0; i < MAX_INVENTORY; i++) {
if (sd->status.inventory[i].nameid && sd->status.inventory[i].equip)