#size - minor but noticeable bug
Sorry if this is mentioned elsewhere, I couldn't find anything relevant when I searched.
At this point in time, I'm away from my computer that has my emu files, so I can't give specifics on which file versions I'm using, though I'm pretty sure I'm using the binaries included with EQOffline 1.03c, and I have a version of projectEQ's databases that provides data for both Ykesha and PoP. Anyway, I've noticed that using #size restricts the user to only using integers. Ex: #size 5 - size becomes 5 #size 100 - size becomes 100 #size 5.5 - size becomes 5 I checked the database, but the size field's datatype is a float. I have some emu source at my emu computer, but haven't looked enough to be able to find where it handles size. I'm assuming that either the datatype in the source is set to something like int or short, or that the code that processes the size stops at the first non-numeric character (decimal point in this case). |
First of all, I always find the CVS Browse feature on Sourceforge.net AWESOME for researching stuff like this. A direct link to the main stuff for the Emu can be found here.
It looks like the data type in the packet is a float. common/eq_packet_structs.h: Code:
199 struct Spawn_Struct { zone/command.cpp Code:
2273 void command_size(Client *c, const Seperator *sep) |
I downloaded the source and did some searching. I mention this below, too, but it looks like size gets casted into an int as it's placed as a parameter into SendAppearancePacket().
Found it in mob.h As taken from mob.cpp: Code:
1157 void Mob::ChangeSize(float in_size = 0, bool bNoRestriction) { This also exists in mob.h Code:
1117 void Mob::SendAppearancePacket(int32 type, int32 value, bool WholeZone, bool iIgnoreSelf, Client *specific_target) { Code:
445 /* Code:
#define LiveOP_SpawnAppearance 0x012F // Sets spawnid/animation/equipment |
Not to derail this thread, but I am curious why you would want to adjust size in more increments than normal integers? Unless mobs are standing shoulder to shoulder, you would probably not be able to notice anymore difference than the current available size options.
If you had mob size 1 standing next to 2 and 2 standing next to 3 and so on, after about 10, the difference is barely noticeable. The only reason I can think you might even want this would be if you wanted to go smaller than 1. It seems to me that setting this would mean slightly more work for the server. Not much, but probably not worth it to most people. Also, I don't think that this could be considered a bug. Unless there is #size works differently in EQOffline than it does in the normal eqemu code. This is a pretty standard feature that duplicates how it worked on eqlive. Maybe I am misreading your post. |
I believe the issue is more or less that, when a mob is spawned from the DB, it uses a float value for the size, but it doesn't when you manually change the size using #size. It should really be one way or the other. I think kedobin and myself are of the opinion that both should be floats.
The thing that I'm noticing is that the SpawnAppearance_Struct uses an integer instead of a float because I assume it is multipurpose (hence the type field). Because that's the structure of the packet that's sent to the client, it looks like there's going to be a limitation with the client. |
I agree that it's not a big deal - that's why I consider it a minor bug. I'm not looking to make something size 3.141529 - I'm merely wanting to have increments in tenths - any smaller may be overkill.
I consider it noticeable because if I remember correctly, in EQLive there is more variation in size among the player races. Right now I either feel like a giant, or a midget in the emu at times. I successfully changed and compiled the code so that it refers to the data as float rather than int or uint32. However, in practice this actually 1: makes the target disappear; 2: if it's a player, he/she cannot move (acts as if rooted). Looks like there may be more to it than it first appears. |
Quote:
|
Quote:
The missized characters are the bots. Standard npc sizes and standard player sizes match, but at least some, if not all, of the bots are missized (not fully tested, but I'm assuming all are too small). Returning to the original topic, a quick summary on #size treating input as integers... Yes, datatypes in the database for size are float. Yes, datatypes in the code for size begin as float, but are cast into int. No, it doesn't look so straightforward that you could merely change the datatypes into float and be done with it - after some changes I made, using the #size command in this setting results in the target disappearing and being unable to move, though it still exists and can be targeted. It's almost as if the #sized target is both invisible and rooted. No, I don't have much time to look into it, though if it gets on my nerves again someday, I might see what else I can try and break while trying to fix it :smile: |
All times are GMT -4. The time now is 07:06 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.