Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Tiberian Technologies / Blackhand Studios » Tiberian Technologies Forum » Set_Obj_Radar_Blip_Color doesn't work on-line
Set_Obj_Radar_Blip_Color doesn't work on-line [message #487605] Thu, 15 May 2014 19:18 Go to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3813
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.

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 messageGo to next message
danpaul88 is currently offline  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.


http://steamsignature.com/card/1/76561197975867233.png

[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 messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

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 #487608 is a reply to message #487605] Fri, 16 May 2014 01:42 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
Mind fixing it in 4.2? Smile dt will probably find a use for it before long...

http://steamsignature.com/card/1/76561197975867233.png
Re: Set_Obj_Radar_Blip_Color doesn't work on-line [message #487609 is a reply to message #487608] Fri, 16 May 2014 06:43 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3813
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Right now I've basically rebuilt Commands->Add_Objective, Commands->Set_Objective_Status, and Commands->Remove_Objective beings the stock Renegade's system doesn't work on-line.

I decided to do this because most of the 80unique players that have joined my server seem to manage click okay threw the two pop-up dialogs telling them what their objectives were (first one popped up on join stating the player should read chat for mission objective updates, the second one popped up 10 seconds later displaying what the objective is) and the proceed to ask me what we're suppose to do. I also tried making flashing objective makers on the radar, which did work but some still managed to overlook it, so I feel the color coded Ren approach is still best.

So I've got it so on join it restates all pending objectives (categorized by priority).
index.php?t=getfile&id=14945&private=0
I still wish we had the POGs working or at least the HUD_Help_Text (especially since we'll have to make this work for ECW when it moves to 4.X beings it already makes use of it working on line).


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 messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3813
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;


Re: Set_Obj_Radar_Blip_Color doesn't work on-line [message #487611 is a reply to message #487605] Fri, 16 May 2014 06:50 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
Based on what jonwil has said I suspect you won't get anywhere with that, the rare data will include the players team and thus the call to reset will be triggered when it reads that part of the data packet.

http://steamsignature.com/card/1/76561197975867233.png
Re: Set_Obj_Radar_Blip_Color doesn't work on-line [message #487612 is a reply to message #487605] Fri, 16 May 2014 06:53 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
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.

http://steamsignature.com/card/1/76561197975867233.png
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 messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3813
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!


Re: Set_Obj_Radar_Blip_Color doesn't work on-line [message #487619 is a reply to message #487605] Fri, 16 May 2014 08:20 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
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, as should Set_Model which AR uses for setting the correct camo for a vehicle depending on the map type (desert, snow, forest or urban)

http://steamsignature.com/card/1/76561197975867233.png

[Updated on: Fri, 16 May 2014 08:21]

Report message to a moderator

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 messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3813
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.


[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 #487622 is a reply to message #487605] Fri, 16 May 2014 08:40 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
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.

http://steamsignature.com/card/1/76561197975867233.png
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
Jerad2142 is currently offline  Jerad2142
Messages: 3813
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.


Previous Topic: Move refill button on sidebar to right side (hotkey 5)
Next Topic: Level Edit
Goto Forum:
  


Current Time: Sun Dec 22 19:55:10 MST 2024

Total time taken to generate the page: 0.01338 seconds