| Mirage Source http://miragesource.net/forums/ |
|
| Sprite Change Error http://miragesource.net/forums/viewtopic.php?f=201&t=3734 |
Page 1 of 1 |
| Author: | Stomach Pulser [ Sat May 17, 2008 11:44 pm ] |
| Post subject: | Sprite Change Error |
I added a sprite change, damage, and heal attribute to my game. Now, the damage and heal work nicely, but the sprite change is buggy. When i walk through it I literally warp through it (I move so fast). And after I head through say up, my characters poisition is not true (it is 1 more upwards than I really am). This goes for all directions (any direction I walk through the SC tile, I get off by 1 in that direction). The change of sprites works though. I noticed this because I would hit my damage/heal tiles impropery after I changed sprites. Here is my sc code (in playermovement on the server side - calculated at the vary end (before it checks for position modification)): Code: ' Check for sprite change
If Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Type = TILE_TYPE_SPRITE Then 'TempSprite = GetPlayerSprite(Index) Call SetPlayerSprite(Index, Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Data1) Call SendPlayerData(Index) Moved = YES End If |
|
| Author: | Dragoons Master [ Sun May 18, 2008 1:40 pm ] |
| Post subject: | Re: Sprite Change Error |
The fast warping thing is probably because of the SendPlayerData. Client side, it changes the player x/y to the actual and zero the x/yoffset. Just add a new packet that will send only the information that changed, PlayerSprite. |
|
| Author: | Stomach Pulser [ Sun May 18, 2008 4:13 pm ] |
| Post subject: | Re: Sprite Change Error |
thanks, it works now. Being lazy never works... |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|