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 #335943 is a reply to message #335910] Thu, 19 June 2008 10:01 Go to previous messageGo to previous message
Sir Kane
Messages: 1701
Registered: March 2003
Location: Angerville
Karma:
General (1 Star)
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!


Proud N9500 and proud N6270 user. Creator of the IEE libraries (original bhs.dll) and the RB series software.
http://n00bstories.com/image.fetch.php?id=1189992501http://www.n00bstories.com/image.fetch.php?id=1257492907
 
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 10:27:10 MST 2024

Total time taken to generate the page: 0.01513 seconds