AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   game_team_master & game_team_set fix (CS 1.6) v0.3 [UPDATE 15/09/10] (https://forums.alliedmods.net/showthread.php?t=136500)

AlexALX 08-27-2010 12:36

Re: game_team_master&game_team_set Fix (CS 1.6)
 
Quote:

Originally Posted by Arkshine (Post 1283380)
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.

Ok... Try to think of something. Buy what about game_team_set? This entity do not have teamindex in standart keyvalues...

Arkshine 08-27-2010 12:48

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.

AlexALX 08-27-2010 12:59

Re: game_team_master&game_team_set Fix (CS 1.6)
 
Quote:

Originally Posted by Arkshine (Post 1283400)
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.

I working now with Ham_Use... Thank you.

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...

Arkshine 08-27-2010 13:15

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 ?

AlexALX 08-27-2010 13:30

Re: game_team_master&game_team_set Fix (CS 1.6)
 
Quote:

Originally Posted by Arkshine (Post 1283423)
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 ?

.... Bad english speak.... try to explain.

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)

Arkshine 08-27-2010 13:38

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.

AlexALX 08-27-2010 13:58

Re: game_team_master&game_team_set Fix (CS 1.6)
 
Quote:

Originally Posted by Arkshine (Post 1283437)
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.

SF_TEAMSET_CLEARTEAM? What this? And do not possible:

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:

Arkshine 08-27-2010 14:05

Re: game_team_master&game_team_set Fix (CS 1.6)
 
spawnflags, look at the HLSDK :

Code:
// // CGameTeamSet / game_team_set -- Changes the team of the entity it targets to the activator's team // Flag: Fire once // Flag: Clear team             -- Sets the team to "NONE" instead of activator #define SF_TEAMSET_FIREONCE         0x0001 #define SF_TEAMSET_CLEARTEAM        0x0002 class CGameTeamSet : public CRulePointEntity { public:     void        Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value );     inline BOOL RemoveOnFire( void ) { return (pev->spawnflags & SF_TEAMSET_FIREONCE) ? TRUE : FALSE; }     inline BOOL ShouldClearTeam( void ) { return (pev->spawnflags & SF_TEAMSET_CLEARTEAM) ? TRUE : FALSE; } private: }; LINK_ENTITY_TO_CLASS( game_team_set, CGameTeamSet ); void CGameTeamSet::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) {     if ( !CanFireForActivator( pActivator ) )         return;     if ( ShouldClearTeam() )     {         SUB_UseTargets( pActivator, USE_SET, -1 );     }     else     {         SUB_UseTargets( pActivator, USE_SET, 0 );     }     if ( RemoveOnFire() )     {         UTIL_Remove( this );     } }


Quote:

And do not possible

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.
why ? Looking at the definition http://www.thewavelength.net/oldcont..._team_set.html :

"When someone triggers this entity, that player's team will be assigned to the "game_team_master" that this entity targets"

AlexALX 08-27-2010 14:57

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.

Arkshine 08-27-2010 17:31

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.


All times are GMT -4. The time now is 15:04.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.