[HELP] Ham_CS_RoundRespawn bug
So, a have latest war3ft on my linux server.
Sometimes(randomly) when i buy scroll of respawning, player is transfered to team_spectator (team 3). The part of code: Code:
public _SHARED_Spawn( id )Code:
client_print(id, print_chat, "%d",cs_get_user_team(id));2 3 And i'm transfered to spec team. Sometimes it works well. So, what's the reason for this and if there exists another way to respawn player with correct team? So, i'm thinking of writing my own module or fixing ham for respawn. Can anyone tell me where to find part of code where Ham_CS_RoundRespawn respawns a player? |
Re: [HELP] Ham_CS_RoundRespawn bug
You only have to use Ham_CS_RoundRespawn once to respawn a player.
It isn't bugged like spawn() is. |
Re: [HELP] Ham_CS_RoundRespawn bug
And i use only
// Spawn the player ExecuteHamB(Ham_CS_RoundRespawn,id); as you can see. Here is a screenshot of Code:
client_print(id, print_chat, "%d",cs_get_user_team(id)); |
Re: [HELP] Ham_CS_RoundRespawn bug
Use Ham_Spawn. I never have a problem with this.
|
Re: [HELP] Ham_CS_RoundRespawn bug
No, that's wrong. There is tuto with explanations. It's the same as using spawn() or cs_user_spawn(), both generates problems because it doesn't follow the right way of respawing a player.
You have to use either DEAD_RESPAWNABLE + Think(), or Ham_CS_RoundRespawn. |
Re: [HELP] Ham_CS_RoundRespawn bug
OMG, open your eyes! There is Ham_CS_RoundRespawn only. Nothing else.
|
Re: [HELP] Ham_CS_RoundRespawn bug
Answered to Owner123, not you.
About your problem, no idea. It happens when exactly ? I doubt randomly. So, i'm thinking of writing my own module or fixing ham for respawn ; Ham calls just the CS functions, these ones work fine. So, It would be more you don't use properly the function or not at the right time. You can try the other method, flag + think. |
Re: [HELP] Ham_CS_RoundRespawn bug
Sorry.
And yes, it happens randomly. I fixed it some way and it works well but it's not the panacea. I have linux server and amxx 1.8.2. Same situation with 1.8.1 with windows. |
Re: [HELP] Ham_CS_RoundRespawn bug
Can you test your method with any other plugin running ?
Extract spawn code and make a single plugin and try to reproduce the bug ? |
Re: [HELP] Ham_CS_RoundRespawn bug
Looking at the decompiled code, both way do actually the same thing at the end :
Code:
respawn();There are though one small difference : - DEAD_RESPAWNABLE + Think() While we are dead, we are in CBasePlayer::PlayerDeathThink(). Some stuffs are done ( animation, weapon drop, etc. ) and there is a check DEAD_RESPAWNABLE which will allow to spawn. So this way triggers directly this check.- Ham_CS_RoundRespawn It calls actually CBasePlayer::RoundRespawn(). This functions does basically : punish you (kill) if you have tk'ed before (if mp_tkpunish is enabled), respawn you if m_iMenu offset is not equal to 3. ( 3 = #Terrorist_Select and #CT_Select )So, I don't see how you can respawn in spectator from the CS code. Your bug is most likely because of some code in your plugin or others. |
| All times are GMT -4. The time now is 02:07. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.