game_team_master & game_team_set fix (CS 1.6) v0.3 [UPDATE 15/09/10]
3 Attachment(s)
game_team_master & game_team_set fix (CS 1.6) v0.3 Description:This plugin fix game_team_master and game_team_set entities for CS 1.6. Without this plugin, these entities are always activated, regardless of the team player. Modules: Сstrike Fakemeta Hamsandwich How to use: Quote:
Quote:
ChangeLog: Quote:
|
Re: game_team_master&game_team_set Fix (CS 1.6)
Quote:
|
Re: game_team_master&game_team_set Fix (CS 1.6)
Quote:
|
Re: game_team_master&game_team_set Fix (CS 1.6)
This plugin fails out teh asshole.
|
Re: game_team_master&game_team_set Fix (CS 1.6)
You say teamindex doesn't work, how did you tested ? Looking at the CS code, the keyvalue "teamindex" is well implemented and its offset should be 34 or 35.
|
Re: game_team_master&game_team_set Fix (CS 1.6)
Quote:
ps someone can give a list Entites where used as a team set game_team_master? (as game_player_hurt) They also like in CS does not work. |
Re: game_team_master&game_team_set Fix (CS 1.6)
I testet get_pdata_cbase(ent, 34) - always return -1, regardless of what is really set in editor. 35 - error.
Quote:
|
Re: game_team_master&game_team_set Fix (CS 1.6)
After some checks, the code is the same as HL1, so like you can see in HLSDK :
Code:
Code:
Code:
The problem is in UTIL_TeamsMatch(), because CBaseEntity::TeamID() and CGameTeamMaster::TeamID() return "" in CS. So yes, you can put any teamindex value, it will return always "", thus the check UTIL_TeamsMatch() always true. As solution, you can hook CGameTeamMaster::TeamMatch() with Orpheu and redo the function and checking manually with the offset 35 (m_teamIndex) and cs_get_user_team for activor. EDIT : I was writting the signature of the function when i've seen that in the windows decompiled code, the function is integrated as inline into CGameTeamMaster::Use(). Meaning, for windows It would need to redo the Use() function... :/ Will do it later, anyway. |
Re: game_team_master&game_team_set Fix (CS 1.6)
What should I do? oO
|
Re: game_team_master&game_team_set Fix (CS 1.6)
You can try to do like I've said, after all it's your plugin. But the current solution is not appropriate because the issue is not the teamindex keyvalue, and you should anyway use a proper version which doesn't require a specific change to get working the entity.
|
Re: game_team_master&game_team_set Fix (CS 1.6)
Quote:
|
Re: game_team_master&game_team_set Fix (CS 1.6)
Actually, you could also simply rewrite Use() without using orpheu. (So hooking Ham_Use, and superceding at the end) You have the HLSDK to help you what does each function. Since it won't called often, it would be fine. If you don't know, tell me I will do.
About game_team_set, it should not a problem if you redo the function of game_team_master. Nothing to fix. |
Re: game_team_master&game_team_set Fix (CS 1.6)
Quote:
But about game_team_set - you dont undestand... With this plugin i can write team to change for game_team_master, as standart - team change only for activator team, do not possible to change to other team... Yes of course you can make a copy game_team_master and use trigger_changetarget but it's faster and easier... |
Re: game_team_master&game_team_set Fix (CS 1.6)
Sorry not sure to understand you. I'm not used at all of such entities at all.
"team change only for activator team, do not possible to change to other team" why ? like you said, it changes with the activator team, so it just a matter to trigger with the team you want, right ? |
Re: game_team_master&game_team_set Fix (CS 1.6)
Quote:
Standart game_team_set: if CT use game_team_set - game_team_master now activate only for CTs. if T use game_team_set - game_team_master now activate only for Ts. I create teamindex value in game_team_set, and now: if CT or T use game_team_set and teamindex=0 - game_team_master now activate all teams. else if CT or T use game_team_set and teamindex=1 - game_team_master now activate only for Ts. else if CT or T use game_team_set and teamindex=2 - game_team_master now activate only for CTs. else if CT or T use game_team_set and teamindex=3 - game_team_master now activate only activator team (team of player who use game_team_set). understand? or not oO ps I've already figured out how to use teamindex, so right now I will make a new version, but until about game_team_set must resolve the issue with non-standard field teamindex. And as I understood this to be done to fix all Entin that somehow intersect with game_team_master...? (game_team_set, game_player_hurt etc) |
Re: game_team_master&game_team_set Fix (CS 1.6)
Yes, but still I don't think there is a need to fix something.
- if CT uses game_team_set - game_team_master now activates only for CTs. - if T uses game_team_set - game_team_master now activates only for Ts. - if SF_TEAMSET_CLEARTEAM is used to clear the team - game_team_master now activate for both. So, what is the difference ? For me, you need only to fix CGameTeamMaster::Use() only. |
Re: game_team_master&game_team_set Fix (CS 1.6)
Quote:
if CT uses game_team_set - game_team_master now activates only for Ts. if T uses game_team_set - game_team_master now activates only for CTs. :nono: |
Re: game_team_master&game_team_set Fix (CS 1.6)
spawnflags, look at the HLSDK :
Code:
Quote:
"When someone triggers this entity, that player's team will be assigned to the "game_team_master" that this entity targets" |
Re: game_team_master&game_team_set Fix (CS 1.6)
Arkshine - no, i testet, only possibly to change in this format:
If CT activate game_team_set - game_team_master now activate only CTs. If T activate game_team_set - game_team_master now activate only Ts. And no other way. Etc: If T activate game_team_set - game_team_master now activate only CTs. If CT activate game_team_set - game_team_master now activate only Ts. If CT or T activate game_team_set - game_team_master now activate all. This is impossible in standart game_team_set. You must use trigger_changetarget and copy of game_team_master with the right team player. That's what I mean. |
Re: game_team_master&game_team_set Fix (CS 1.6)
Ok, I understand better. But for game_team_set, I would use pev_team ( "team" ) instead, then storing its value in m_teamIndex.
|
Re: game_team_master&game_team_set Fix (CS 1.6)
Released v0.2... Test this...
Arkshine - very thanks you. |
Re: game_team_master&game_team_set Fix (CS 1.6)
A major problem with your plugin is it doesn't care about the others things. The purpose is to provide a fix, it means your plugin must have all the functionalities of entities. The code should be the same as the HLSDK with what you add.
|
Re: game_team_master&game_team_set Fix (CS 1.6)
Quote:
Code:
void CGameTeamMaster::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) Code:
if ( !CanFireForActivator( pActivator ) ) Code:
if ( TeamMatch( pActivator ) ) Code:
if ( RemoveOnFire() ) |
Re: game_team_master&game_team_set Fix (CS 1.6)
Something like that :
PHP Code:
With orpheu, we could call directly the functions, maybe I will do it another day. |
Re: game_team_master&game_team_set Fix (CS 1.6)
Arkshine - very thanks. I tested it tomorrow and try to do with his idea about game_team_set. In orpheu you need intercept function
Quote:
|
Re: game_team_master&game_team_set Fix (CS 1.6)
I know it returns -1, why are you talking about that, we don't need this function anyway.
|
Re: game_team_master&game_team_set Fix (CS 1.6)
Arkshine - i now tested you code and it do not work (always not activate). something wrong ... right now, try to understand.
|
Re: game_team_master&game_team_set Fix (CS 1.6)
When i've said "Not much tested" ; I have still tested enough to post. Otherwise I would not have post a not-working plugin. So far I remember I've tested on both team, all etc.. with a game_player_equip entity and it was working perfectly for all cases.
|
Re: game_team_master&game_team_set Fix (CS 1.6)
Quote:
Code:
SUB_UseTargets( gameTeamMaster, activator, USE_TYPE:get_pdata_int( triggerType, 4 ), value ); Code:
SUB_UseTargets( gameTeamMaster, activator, USE_TYPE:get_pdata_int( gameTeamMaster, triggerType, 4 ), value ); And so - thank you very much. Still, you are mistaken in this... :wink: And Code:
if ( !CanFireForActivator( gameTeamSet, activator ) ) Code:
if ( !CanFireForActivator( gameTeamSet, activator ) ) |
Re: game_team_master&game_team_set Fix (CS 1.6)
Yes I've tested it faslty like i've said, but you're talking about about a thing there is some time ago and I don't remember well. Maybe I've tested only game_team_set but I remember well i've spent many time on it and I've posted only when it was working fine. Maybe I've done some modifications when I've cleanup the code, because since I was using a game_player_equip entity I remember I could know if it was working or not if I get or not a gun. So, probably a typo when I wanted to release.
Anyway for the first you're right, obviously. The second, you're wrong. We have changed nothing which need to be supercede, just a check. |
Re: game_team_master & game_team_set fix (CS 1.6) v0.3 [UPDATE 15/09/10]
Released new version (v0.3).
|
Re: game_team_master & game_team_set fix (CS 1.6) v0.3 [UPDATE 15/09/10]
The plugin is well done.
If you would like any information regarding possible adjustments you could make or things you could do to make this better, please feel free to post here or PM me. Approved. |
Re: game_team_master & game_team_set fix (CS 1.6) v0.3 [UPDATE 15/09/10]
Can anyone confirm that this plugin is correctly working?
I can't make it work and I've found at least 1 error. It's not passing the index of string. Quote:
|
All times are GMT -4. The time now is 06:40. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.