Raised This Month: $51 Target: $400
 12% 

[TF2][PSM][Updater] Revive Markers (v1.7.2, 2015-03-12)


Post New Thread Reply   
 
Thread Tools Display Modes
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 07-15-2014 , 13:26   Re: [TF2] Revive Markers (v1.0, 2014-07-15)
Reply With Quote #11

CTFReviveMarker has some interesting functions on it... if you had signatures for them, you could call them; none of the class-specific functions are in the vtable so offsets don't apply.

Interesting ones being CTFReviveMarker::Create(CTFPlayer *) (likely a static function) and CTFReviveMarker::IsReviveInProgress(void) to name two (the first would simplify the setup of the marker, the second could check if the player was being revived.)
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 07-15-2014 at 13:30.
Powerlord is offline
lyric
Veteran Member
Join Date: Sep 2012
Old 07-15-2014 , 13:40   Re: [TF2] Revive Markers (v1.0, 2014-07-15)
Reply With Quote #12

im not sure if this is intended but all classes can see the Revive icon thingy that is for Medics only, i dont know the name of it but with so many killings going on for everyone to see the icon thingy makes for messy. is there a way to restrict those callouts for reviving only for Medics?

__________________

Last edited by lyric; 07-15-2014 at 13:42.
lyric is offline
Wolvan
Senior Member
Join Date: Jul 2014
Location: Tyrol, Austria
Old 07-15-2014 , 13:41   Re: [TF2] Revive Markers (v1.0, 2014-07-15)
Reply With Quote #13

Quote:
Originally Posted by lyric View Post
im not sure if this is intended but all classes can see the Revive icon thingy that is for Medics only, i dont know the name of it but with so many killings going on for everyone to see the icon thingy makes for messy. is there a way to restrict those callouts for reviving only for Medics?
I will look into that, not sure if I'll be able to fix it though. I'll try my best either way!
Wolvan is offline
Send a message via Skype™ to Wolvan
Mitchell
~lick~
Join Date: Mar 2010
Old 07-15-2014 , 13:46   Re: [TF2] Revive Markers (v1.0, 2014-07-15)
Reply With Quote #14

why aren't you using the revive marker's skin, but instead setting the render color?
and what the heck is this "dummyFunction" that takes in the version convar, and does nothing with it?
Theres also that bulky if statement, what I would do is something like this:
PHP Code:
SetEntProp(reviveMarkerProp_Send"m_nBody", (class == TFClass_Scout) ? CLASS_SCOUT : class-1); 
Since TFClassType matches nearly what your defines are then you could just do some simple math, instead of doing a bunch of branches, and just have one little in-line check to see if it is a scout, and return a different number.

Also, you seem to use GetClientTeam 3 times, why not just set a variable then?

By all means these are just suggestions i'm not trying to insult you by anyway, it was just a very short plugin and it looked interesting.

Last edited by Mitchell; 07-15-2014 at 14:04.
Mitchell is offline
Wolvan
Senior Member
Join Date: Jul 2014
Location: Tyrol, Austria
Old 07-15-2014 , 13:47   Re: [TF2] Revive Markers (v1.0, 2014-07-15)
Reply With Quote #15

Quote:
Originally Posted by Mitchell View Post
why aren't you using the revive marker's skin, but instead setting the render color?
Because I was not aware of the fact that the Revive Marker has multiple skins, I tried setting m_nSkin to different values but it it was always a red marker
Wolvan is offline
Send a message via Skype™ to Wolvan
Mitchell
~lick~
Join Date: Mar 2010
Old 07-15-2014 , 13:55   Re: [TF2] Revive Markers (v1.0, 2014-07-15)
Reply With Quote #16

Quote:
Originally Posted by Wolvan View Post
Because I was not aware of the fact that the Revive Marker has multiple skins, I tried setting m_nSkin to different values but it it was always a red marker
Maybe im wrong on this, since it was for MvM they probably didn't bother setting it.
Mitchell is offline
Wolvan
Senior Member
Join Date: Jul 2014
Location: Tyrol, Austria
Old 07-15-2014 , 13:59   Re: [TF2] Revive Markers (v1.0, 2014-07-15)
Reply With Quote #17

Quote:
Originally Posted by Mitchell View Post
Maybe im wrong on this, since it was for MvM they probably didn't bother setting it.
That's exactly the reason why I used the render color as a way around it. It just has to be clear which team the marker belongs to in my opinion

Quote:
Originally Posted by pheadxdll View Post
I've had the reanimators in Stop that Tank for awhile now and in the war & love update Valve removed a check so medics can heal them without being in MvM and they did the same for the cancel hud for anyone wondering.

You don't have to use a detour to stop the player from respawning, just use this code whenever you create the entity_revive_marker:
Code:
SetEntDataEnt2(client, FindSendPropInfo("CTFPlayer", "m_nForcedSkin")+4, iMarker);
There are more problems with the shields like the marker bubble showing for everyone on the server and an instant revive bug Valve hasn't fixed. When I release it someone can use my fixes it if it'll help.
Thank you a lot! It worked perfectly, the respawn time is now being overriden when you get healed. Lots of thank you!
Wolvan is offline
Send a message via Skype™ to Wolvan
Mitchell
~lick~
Join Date: Mar 2010
Old 07-15-2014 , 14:03   Re: [TF2] Revive Markers (v1.0, 2014-07-15)
Reply With Quote #18

Wolvan, i added a few more points to this post above: https://forums.alliedmods.net/showpo...8&postcount=14
Mitchell is offline
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Old 07-15-2014 , 14:12   Re: [TF2] Revive Markers (v1.0, 2014-07-15)
Reply With Quote #19

Code:
SetEntProp(iMarker, Prop_Send, "m_nBody", _:TF2_GetPlayerClass(client)-1);
cheers!
__________________
pheadxdll is offline
Wolvan
Senior Member
Join Date: Jul 2014
Location: Tyrol, Austria
Old 07-15-2014 , 14:13   Re: [TF2] Revive Markers (v1.0, 2014-07-15)
Reply With Quote #20

Quote:
Originally Posted by Mitchell View Post
why aren't you using the revive marker's skin, but instead setting the render color?
and what the heck is this "dummyFunction" that takes in the version convar, and does nothing with it?
Theres also that bulky if statement, what I would do is something like this:
PHP Code:
SetEntProp(reviveMarkerProp_Send"m_nBody", (class == TFClass_Scout) ? CLASS_SCOUT : class-1); 
Since TFClassType matches nearly what your defines are then you could just do some simple math, instead of doing a bunch of branches, and just have one little in-line check to see if it is a scout, and return a different number.

Also, you seem to use GetClientTeam 3 times, why not just set a variable then?

By all means these are just suggestions i'm not trying to insult you by anyway, it was just a very short plugin and it looked interesting.
I honestly don't mind suggestions, quite the opposite! I am happy people take their time to help me get better at SourceModding! This is my first plugin after all.

The dummy function is just there so that the compiler won't throw the warning that the ConVar is never used.
I did GetClientTeam that often because I honestly, wrote the plugin on the fly and didn't think about that, will change it though!
About the Bulky if-Statement.... that is because the m_nBody Values are, at least in my opinion, arranged super weird, you can check the values out at the top where I define all these CLASS_ variables. I might change it to an array that contains the right integer based on the class ID
Wolvan is offline
Send a message via Skype™ to Wolvan
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:00.


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