Set_Obj_Radar_Blip_Color doesn't work on-line [message #487605] |
Thu, 15 May 2014 19:18 ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](/images/custom_avatars/21300.png) |
Jerad2142
Messages: 3807 Registered: July 2006 Location: USA
Karma: 6
|
General (3 Stars) |
|
|
Seems that it only displays as whatever team's color the object is. In 3.4.4 there was a command (Set_Obj_Radar_Blip_Shape_Player) that allowed us to place blips on the radar of whatever color and shape one wanted, but that doesn't seem to exist anymore, but this one isn't doing the trick.
Visit Jerad's deer sweat shop
|
|
|
Re: Set_Obj_Radar_Blip_Color doesn't work on-line [message #487606 is a reply to message #487605] |
Fri, 16 May 2014 01:18 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/custom_avatars/2893.jpg) |
danpaul88
Messages: 5795 Registered: June 2004 Location: England
Karma: 0
|
General (5 Stars) |
|
|
The 4.1 radar sync netcode is in Export_Rare, try flagging the dirty bit to tell the engine it needs to send an update over the network;
PhysicalGameObj *pObj = obj->As_PhysicalGameObj();
if (pObj)
{
Commands->Set_Obj_Radar_Blip_Color(obj, 123456);
pObj->Set_Object_Dirty_Bit(NetworkObjectClass::BIT_RARE, true);
}
I can't find the code behind the actual setting of the blip color on the PhysicalGameObj via the web interface so I can't check if it is setting the dirty bit internally or not, but there's a good chance it isn't if you're seeing problems with it. If I think on I'll look for it properly when I get home and have a proper copy of the source code to look at.
It's also worth noting that a VehicleGameObj will reset its radar blip color every time a driver enters or the last person exits the vehicle.
[Updated on: Fri, 16 May 2014 01:34] Report message to a moderator
|
|
|
Re: Set_Obj_Radar_Blip_Color doesn't work on-line [message #487607 is a reply to message #487605] |
Fri, 16 May 2014 01:35 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
|
Looking at PhysicalGameObj::Import_Rare, it seems like the problem is that the radar blip types are set early in the function. Then later Set_Player_Type is called (to set the player type) which calls Reset_Radar_Blip_Color_Type which then resets the blip color.
So the answer is that yes its a bug in 4.1 and no I dont know of any plans to make a 4.1 release containing a fix.
Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
|
|
|
|
|
Re: Set_Obj_Radar_Blip_Color doesn't work on-line [message #487610 is a reply to message #487607] |
Fri, 16 May 2014 06:47 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](/images/custom_avatars/21300.png) |
Jerad2142
Messages: 3807 Registered: July 2006 Location: USA
Karma: 6
|
General (3 Stars) |
|
|
jonwil wrote on Fri, 16 May 2014 02:35 | Looking at PhysicalGameObj::Import_Rare, it seems like the problem is that the radar blip types are set early in the function. Then later Set_Player_Type is called (to set the player type) which calls Reset_Radar_Blip_Color_Type which then resets the blip color.
So the answer is that yes its a bug in 4.1 and no I dont know of any plans to make a 4.1 release containing a fix.
|
I'm going to try adding Set_Object_Dirty_Bit to it, because I feel like that should work for players that are already in-game (I can see it not working for players that join late, but I can put in a temp hack that just resets the shape and color for every player that joins).
Currently my code sets the player type before setting the radar stars, which is why I'm under the impression that adding Set_Object_Dirty_Bit would work; however, if Set_Object_Dirty_Bit is a bulk net update (IE: sends all the objects data every time instead of just what has changed) I can see how this won't solve anything.
GameObject *radarMarker = Commands->Create_Object("Daves Arrow",pos);
Commands->Set_Player_Type(radarMarker,team);
Commands->Set_Is_Visible(radarMarker,false);
Commands->Set_Model(radarMarker,"null");
Commands->Set_Obj_Radar_Blip_Shape(radarMarker,RADAR_BLIP_SHAPE_OBJECTIVE);
Commands->Set_Obj_Radar_Blip_Color(radarMarker,priority == Primary ? RADAR_BLIP_COLOR_PRIMARY_OBJECTIVE : priority == Secondary ? RADAR_BLIP_COLOR_SECONDARY_OBJECTIVE : RADAR_BLIP_COLOR_TERTIARY_OBJECTIVE);
return radarMarker;
Visit Jerad's deer sweat shop
|
|
|
|
|
Re: Set_Obj_Radar_Blip_Color doesn't work on-line [message #487617 is a reply to message #487612] |
Fri, 16 May 2014 08:14 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](/images/custom_avatars/21300.png) |
Jerad2142
Messages: 3807 Registered: July 2006 Location: USA
Karma: 6
|
General (3 Stars) |
|
|
danpaul88 wrote on Fri, 16 May 2014 07:53 | Also, I see no reason you couldn't use the 4.2 and, later, 5.x scripts branch for ECW if you made it into a standalone game (I think it might already be anyway?) so it can benefit from the stuff we're doing which isn't compatible with stock Renegade.
|
In ECW (which is already standalone and formerly known as Roleplay2) I've made several features so I can do things client side that you don't have control over in scripts (IE, I have control over these aspects for specific client dynamically at runtime: Set_Model, Set_Position, display Set_Hud_Help_Text, change strings library entries, Set_Animation). Setting position of an object on a client is extremely useful due to the floating point error (On the extreme edges of the map (like 10,000+m out from the center of the map) we have PT's that float a good 2m off the walls without it). Set_Hud_Help_Text is a favorite of mine because its far more useful than chat which can be spammy and gets over looked.
Honestly I'd tempted to go back and make all the stock Ren objective/pog functionality sync as well to that list too (because now that I've used it and seen how easy it was to use in Ren it'd make a good addition to ECW's Mutant Assault maps, or at least the special events on the main map.) but it seems kind of pointless, because if I did then either we lose it when we go to 4.X, or you guys put time into making the Ren code sync with the clients, but make it specific for ECW, which in my eyes seems pointless to make a bunch of specific code for ECW when up to this point ECW is scripts 3.4.4, thus it seems silly in my eyes that it should need its own special code base in the future (yeah separating all the scripts makes sense, no one wants 1000 RP2 scripts in their drop down that they can't use).
Now on a side note C&C_Bear_Island is the map/mod I'm making for Renegade in 4.2, and that's why I'm bitching so much, because I keep coming across things I can't do any more that I got so used to in the last 5 years of being under 3.4.4 with ECW. Granted, only a few of those things would actually be useful now Hud_Help_Text, Set_Animation(Useful for making Visceroids animate clientside) and hell, if I had access to the network stuff I'd do my best to make an objective syncing system too (except it'd be per player instead of per team and it'd actually call Ren's POG system, make use of the hud help text and all that good stuff unlike what I'm doing now which only has radar stars and console text).
But I'm ranting again... long story short: fixed radar star colors, sounds good!
Visit Jerad's deer sweat shop
|
|
|
|
Re: Set_Obj_Radar_Blip_Color doesn't work on-line [message #487621 is a reply to message #487619] |
Fri, 16 May 2014 08:25 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](/images/custom_avatars/21300.png) |
Jerad2142
Messages: 3807 Registered: July 2006 Location: USA
Karma: 6
|
General (3 Stars) |
|
|
danpaul88 wrote on Fri, 16 May 2014 09:20 | Some of those things are already being worked on by TT for 4.2 and Set_Animation should work just fine over the network, we use it in TSR and AR already.
|
Set animation in this case was being used to set it on the clients and not the server, so a soldier would still be able to move around, and on the client it'd appear to be animating and moving instead of just locked in place while it animates. To my knowledge they all work (except set hud text) but most apply to all players instead of letting me do it on a per player basis.
Visit Jerad's deer sweat shop
[Updated on: Fri, 16 May 2014 08:26] Report message to a moderator
|
|
|
|
Re: Set_Obj_Radar_Blip_Color doesn't work on-line [message #487623 is a reply to message #487622] |
Fri, 16 May 2014 08:56 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) |
![](/images/custom_avatars/21300.png) |
Jerad2142
Messages: 3807 Registered: July 2006 Location: USA
Karma: 6
|
General (3 Stars) |
|
|
danpaul88 wrote on Fri, 16 May 2014 09:40 | You should be able to apply a blended animation to a soldier server side without preventing them from moving around... might look a bit weird though depending on how it blends with the walking animation.
|
For me when I applied an animation to any soldier it just locks them in place unless you are flying, if you are flying it knocks you out of the flying mode.
Visit Jerad's deer sweat shop
|
|
|