Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » [Release] split mine limit plug-in  () 9 Votes
Re: [Release] split mine limit plug-in [message #335947 is a reply to message #335943] Thu, 19 June 2008 10:17 Go to previous messageGo to previous message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma:
General (3 Stars)
Sir Kane wrote on Thu, 19 June 2008 13:01

void Maintain_C4_Limit(int team){
	int *type;
	/*Extra vars go right here*/
	
	ScriptableGameObj *obj, *defuse_p = NULL, *defuse_r = NULL;
	int count_p = 0, count_r = 0;
	GenericSLNode *node = GameObjList->Get_Head();
	while (node){
		obj = (ScriptableGameObj*)node->m_pData;
		if (obj->As_PhysicalGameObj() && obj->As_C4GameObj() && obj->Get_Player_Type() == team){
			/* Some extra code goes here (3 lines)*/
			if (*type == C4_PROXIMITY){
				count_p++;
				if (!defuse_p || Get_C4_Time(obj) > Get_C4_Time(defuse_p))defuse_p = obj;
			}
			if (*type == C4_REMOTE){
				count_r++;
				if (!defuse_r || Get_C4_Time(obj) > Get_C4_Time(defuse_r))defuse_r = obj;
			}
			/* Another line */
		}
__next:
		node = node->m_pNext;
	}
	if (count_p > 30 && defuse_p) Defuse_C4(defuse_p);
	if (count_r > 30 && defuse_r) Defuse_C4(defuse_r);
}


FIGURE THE MISSING PARTS OUT!


I didn't have you down as a scripts.dll fanboy, go figure. Sarcasm



 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Having problems with C++
Next Topic: Photoshop help and skinning question
Goto Forum:
  


Current Time: Fri Nov 22 15:26:12 MST 2024

Total time taken to generate the page: 0.00940 seconds