Originally posted by [b]theultramage[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=547
CODE
//For holding basic status (which can be modified by status changes)
struct status_data {
...
struct weapon_atk rhw, *lhw; //Right Hand/Left Hand Weapon. Only players have a lhw (hence it's a pointer)
}
...
struct weapon_atk {
unsigned short atk, atk2;
unsigned short range;
unsigned char ele;
};
Is it required somewhere that lhw be a pointer? Because, if not, then this thing would just be someone's poor attempt at 'optimizing the square wheel'.
If my calculations are correct, then this thing saves an amazing amount of '3' bytes of memory! (pointer = 4 bytes). And wastes much more as the memmgr has to maintain that dynamic memory block.