Quick and easy suggestion..
The #size command seems to have some adverse effects on combat. Basically, you have to be right underneath the monster if the size is too big. My suggestion is to just multiply the monster's size through the distance formula, probably inside the square root or something. I haven't had time to toy around with it, but it's a simple fix that'd save some trouble.
|
Ive noticed and wondered about that myself.. There must be a good way to determine how far from the mob you can be and still attack. Using a formula based off size makes sense, but how is that handled in the code? I havent looked thought the code alot for anything related to something like a 'combat radius'.
|
Code
Code:
float Mob::DistNoRootNoZ(Mob* other) |
Bleh
They need to disable emoticons in code excerpts.
|
On the subject of size, the "size" value in npc_types doesn't seem to work, though the in-game #size command does. Is it possible to fix this (since the opcode or whatever for size is presumably known)?
|
Hmm
We should probably stick an "int8 size;" in the Mob class's public variables and "int8 GetSize() { return size; }" and "void SetSize(int8 newsize) { size = newsize; }" in private.
In client.cpp, we should then target.SetSize(newsize) after the "#size" command is called and store the information. That way the size information could be taken into account in the distance formula. The problem is that when clients sign in, I'm not sure if the server sends the user the packet telling him or her the size of spawns, so you could create a size 100 monster, zone in and out, and the monster would probably look normal sized. I'm not sure if this is how it works, but it's just an educated guess. So I think when the user signs it, their .size should be set to 0. It should then go through all the mobs in the zone, and when it encounters a mob with a size > 0 it tells the client. That's how I'd do it. Unless I'm wrong about the whole thing. |
All times are GMT -4. The time now is 03:23 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.