
03-13-2006, 07:11 PM
|
|
Graal Administration
|
Join Date: Jan 2000
Location: Admins
Posts: 11,693
|
|
|
Ok I have checked how the playertouchsme event is working:
- on serverside it is basicly doing a findareanpcs(player.x+0.5+vecx(player.dir), player.y+1+vecy(player.dir),2,2) each time a player is moving, and is invoking a playertouchsme event on those npcs; it is also verifying that abs(npc.z-player.z)<=3
- on clientside it is checking two points in front of the player, and is invoking the playertouchsme event on npcs that are on those points; it is marking the npc as touched so that it doesn't happen again until the player moves away again.
Although these checks are not very accurate the question is if it's really a problem, I think it's more important that the event is actually happening and not that the player is touching it pixel-wise; by getting the playertouchsme event before the player is actually touching it fully you can avoid some lag |
|
|
|