Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Is_Beacon in SSGM Plugin (ObjectHookCall)
Re: Is_Beacon in SSGM Plugin [message #369878 is a reply to message #369871] Sun, 01 February 2009 06:32 Go to previous messageGo to previous message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma:
General (3 Stars)
SSGM does some strange things to beacons for some very weird reason.

void ObjectCreate(void *stub, GameObject *o)
{
	DLOG;
	YaRRCrate::ObjectCreated(o);
	if(stricmp(Commands->Get_Preset_Name(o), "Invisible_Object") == 0)
	{
		Vector3 pos = Commands->Get_Position(o);
		for(GenericSLNode *x = BaseGameObjList->HeadNode; x != 0; x = x->NodeNext)
		{
			GameObject *obj = (GameObject *)x->NodeData;
			if(obj && As_BeaconGameObj(obj) != 0)
			{
				Vector3 objp = Commands->Get_Position(obj);
				if((pos.X == objp.X) && (pos.Y == objp.Y))
				{
					o = obj;
					break;
				}
			}
		}
	}

	if(Commands->Is_A_Star(o) && Is_Soldier(o))
	{
		Attach_Script_Once(o, "YaRRPlayer", "");
		Attach_Script_Once(o, "YaRRVeteran", "");
	}
	else if(Is_Vehicle(o))
	{
		Attach_Script_Once(o, "YaRRVehicle", "");
	}
	else if(Is_Beacon(o))
	{
		Attach_Script_Once(o, "YaRRBeacon",  "");
	}
	else if(Is_C4(o))
	{
		Attach_Script_Once(o, "YaRRC4", "");
	}
}
 
Read Message
Read Message
Read Message
Previous Topic: [request] High Res Vehicle textures
Next Topic: [WIP] Texture Replacement Mod
Goto Forum:
  


Current Time: Thu Dec 12 05:16:24 MST 2024

Total time taken to generate the page: 0.00704 seconds