Advertisement
Guest User

[FS] - XmasTrees by Killa[DGZ]

a guest
Dec 11th, 2010
1,016
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.84 KB | None | 0 0
  1. /*------------------------------------------------------------------------------
  2. Xmas Tree[FS] Created by Killa[DGZ]
  3. This Christmas Tree [FS] Uses Fallout's Object Streamer Created by: Fallout v0.5
  4. Double-O-Icons by Double-O-Seven for file size reduction from 1Mb to 156K?,
  5. and i have no idea what else it does but it seems works better with it!
  6. ------------------------------------------------------------------------------*/
  7. #define FILTERSCRIPT
  8.  
  9. #include <a_samp>
  10. #include <Double-O-Icons> // < dont ask why this is here but leave it
  11.  
  12. #define GREY 0xAFAFAFAA
  13. #define LIGHTGREEN 0x9ACD32AA
  14. #if defined FILTERSCRIPT
  15.  
  16. #define F_MAX_OBJECTS 1000
  17. #define UpdateTime 300 //update time in ms (milliseconds).
  18. #define ObjectsToStream 300
  19. #define StreamRange 300.0
  20. #pragma dynamic 30000
  21. #define MAX_XMASTREES 100
  22.  
  23. forward F_ObjectUpdate(bool:DontCheckDistance);
  24. forward F_StartUpdate();
  25.  
  26. enum XmasTrees
  27. {
  28. XmasTreeX,
  29. Float:XmasX,
  30. Float:XmasY,
  31. Float:XmasZ,
  32. XmasObject1,
  33. XmasObject2,
  34. XmasObject3,
  35. XmasObject4,
  36. XmasObject5,
  37. XmasObject6,
  38. XmasObject7,
  39. XmasObject8,
  40. XmasObject9,
  41. XmasObject10,
  42.  
  43. };
  44. new Treepos[MAX_XMASTREES][XmasTrees];
  45.  
  46. enum OInfo
  47. {
  48. ModelID,
  49. ObjectID[MAX_PLAYERS],
  50. Float:ox,
  51. Float:oy,
  52. Float:oz,
  53. Float:orox,
  54. Float:oroy,
  55. Float:oroz,
  56. Float:ovdist,
  57. bool:ObjectCreated[MAX_PLAYERS],
  58. };
  59. new ObjectInfo[F_MAX_OBJECTS][OInfo];
  60. new bool:ObjectUpdatetRunning;
  61. new bool:CantCreateMore;
  62. new bool:RefreshObjects[MAX_PLAYERS];
  63. new Float:OldX[MAX_PLAYERS], Float:OldY[MAX_PLAYERS], Float:OldZ[MAX_PLAYERS];
  64.  
  65. public OnFilterScriptInit()
  66. {
  67. print("\n--------------------------------------");
  68. print(" Xmas Trees By Killa[DGZ] ");
  69. print("--------------------------------------\n");
  70. return 1;
  71. }
  72.  
  73. public OnFilterScriptExit()
  74. {
  75. return 1;
  76. }
  77.  
  78. public OnPlayerConnect(playerid)
  79. {
  80. SendClientMessage(playerid, LIGHTGREEN," ");
  81. SendClientMessage(playerid, GREY,"* {FF0000}M{FFFFFF}E{008000}R{FF0000}R{FFFFFF}Y {008000}X{FF0000}M{FFFFFF}A{008000}S{FFFFFF} *");
  82. SendClientMessage(playerid, LIGHTGREEN,"* Type: /xmastreeinfo for more info *");
  83. return 1;
  84. }
  85.  
  86. public OnPlayerCommandText(playerid, cmdtext[])
  87. {
  88. if (strcmp(cmdtext,"/xmastreeinfo",true) == 0)
  89. {
  90. SendClientMessage(playerid, LIGHTGREEN," * Christmas Trees *");
  91. SendClientMessage(playerid, GREY,"* Type: /xmastree to place a Christmas Tree *");
  92. SendClientMessage(playerid, GREY,"* Type: /delcxmastree to delete the Christmas Tree closest to you *");
  93. // SendClientMessage(playerid, GREY,"* Type: /delallxmastree to delete all Christmas Trees *");// not unless you want ppl deleting your trees
  94. SendClientMessage(playerid, GREY,"* Type: /xmastreecredits for the Filterscript credits *");
  95. return 1;
  96. }
  97. if (strcmp(cmdtext,"/xmastreecredits",true) == 0)
  98. {
  99. SendClientMessage(playerid, LIGHTGREEN," * Christmas Tree Credits *");
  100. SendClientMessage(playerid, GREY,"* A Special Thanks Out To The To SA-MP Team For The New Objects *");
  101. SendClientMessage(playerid, GREY,"* Christmas Trees[FS] Was Created By Killa[DGZ] 11-12-2010 *");
  102. SendClientMessage(playerid, GREY,"* This [FS] uses Fallout's Object Streamer Created by Fallout *");
  103. SendClientMessage(playerid, GREY,"* This [FS] also uses Double-O-Icons by Double-O-Seven *");
  104. return 1;
  105. }
  106. if(strcmp(cmdtext, "/xmastree", true) == 0)
  107. {
  108. new Float:plocx,Float:plocy,Float:plocz;
  109. GetPlayerPos(playerid, plocx, plocy, plocz);
  110. SetXmasTree(plocx,plocy,plocz);
  111. SetPlayerPos(playerid, plocx-2.5, plocy+2.5, plocz);//so you dont get stuck in the presents
  112.  
  113. return 1;
  114. }
  115. if(strcmp(cmdtext, "/delcxmastree", true) == 0)
  116. {
  117. DeleteClosestXmasTree(playerid);
  118. return 1;
  119. }
  120. if(strcmp(cmdtext, "/delallxmastree", true) == 0)
  121. {
  122. DeleteAllXmasTree();
  123. return 1;
  124. }
  125. return 0;
  126. }
  127.  
  128. public F_StartUpdate()
  129. {
  130. SetTimer("F_ObjectUpdate", UpdateTime, 1);
  131. }
  132.  
  133. stock F_CreateObject(modelid, Float:x, Float:y, Float:z, Float:rox, Float:roy, Float:roz, Float:vdist=0.0)
  134. {
  135. if(ObjectUpdatetRunning == false)
  136. {
  137. SetTimer("F_StartUpdate", F_MAX_OBJECTS/2, 0);
  138. ObjectUpdatetRunning = true;
  139. }
  140.  
  141. new objectid;
  142.  
  143. if(CantCreateMore == false)
  144. {
  145. for(new i; i<F_MAX_OBJECTS; i++)
  146. {
  147. if(i == F_MAX_OBJECTS-1)
  148. {
  149. printf("Only the first %i objects could be created - object limit exceeded.", F_MAX_OBJECTS);
  150. CantCreateMore = true;
  151. }
  152. if(ObjectInfo[i][ModelID] == 0)
  153. {
  154. objectid = i;
  155. break;
  156. }
  157. }
  158. }
  159. else
  160. {
  161. return -1;
  162. }
  163.  
  164. if(modelid == 0)
  165. {
  166. printf("Invalid modelid for object %i", objectid);
  167. return -1;
  168. }
  169.  
  170. ObjectInfo[objectid][ModelID] = modelid;
  171. ObjectInfo[objectid][ox] = x;
  172. ObjectInfo[objectid][oy] = y;
  173. ObjectInfo[objectid][oz] = z;
  174. ObjectInfo[objectid][orox] = rox;
  175. ObjectInfo[objectid][oroy] = roy;
  176. ObjectInfo[objectid][oroz] = roz;
  177. ObjectInfo[objectid][ovdist] = vdist;
  178. return objectid;
  179. }
  180.  
  181. stock F_IsValidObject(objectid)
  182. {
  183. if(ObjectInfo[objectid][ModelID] == 0 || objectid == -1)
  184. {
  185. return 0;
  186. }
  187. return 1;
  188. }
  189.  
  190. stock F_DestroyObject(objectid)
  191. {
  192. if(F_IsValidObject(objectid))
  193. {
  194. for(new playerid; playerid<MAX_PLAYERS; playerid++)
  195. {
  196. if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid) && ObjectInfo[objectid][ObjectCreated][playerid] == true)
  197. {
  198. DestroyPlayerObject(playerid, ObjectInfo[objectid][ObjectID][playerid]);
  199. ObjectInfo[objectid][ObjectCreated][playerid] = false;
  200. }
  201. }
  202. ObjectInfo[objectid][ModelID] = 0;
  203. return 1;
  204. }
  205. return 0;
  206. }
  207.  
  208. stock F_MoveObject(objectid, Float:x, Float:y, Float:z, Float:speed)
  209. {
  210. if(F_IsValidObject(objectid))
  211. {
  212. new time;
  213. for(new playerid; playerid<MAX_PLAYERS; playerid++)
  214. {
  215. if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid) && ObjectInfo[objectid][ObjectCreated][playerid] == true)
  216. {
  217. time = MovePlayerObject(playerid, ObjectInfo[objectid][ObjectID][playerid], x, y, z, speed);
  218. }
  219. }
  220. return time;
  221. }
  222. return 0;
  223. }
  224.  
  225. stock F_StopObject(objectid)
  226. {
  227. if(F_IsValidObject(objectid))
  228. {
  229. for(new playerid; playerid<MAX_PLAYERS; playerid++)
  230. {
  231. if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid) && ObjectInfo[objectid][ObjectCreated][playerid] == true)
  232. {
  233. StopPlayerObject(playerid, ObjectInfo[objectid][ObjectID][playerid]);
  234. }
  235. }
  236. return 1;
  237. }
  238. return 0;
  239. }
  240.  
  241. stock F_SetObjectPos(objectid, Float:x, Float:y, Float:z)
  242. {
  243. if(F_IsValidObject(objectid))
  244. {
  245. ObjectInfo[objectid][ox] = x;
  246. ObjectInfo[objectid][oy] = y;
  247. ObjectInfo[objectid][oz] = z;
  248. for(new playerid; playerid<MAX_PLAYERS; playerid++)
  249. {
  250. if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid) && ObjectInfo[objectid][ObjectCreated][playerid] == true)
  251. {
  252. SetPlayerObjectPos(playerid, ObjectInfo[objectid][ObjectID][playerid], x, y, z);
  253. }
  254. }
  255. return 1;
  256. }
  257. return 0;
  258. }
  259.  
  260. stock F_GetObjectPos(objectid, &Float:x, &Float:y, &Float:z)
  261. {
  262. if(F_IsValidObject(objectid))
  263. {
  264. x = ObjectInfo[objectid][ox];
  265. y = ObjectInfo[objectid][oy];
  266. z = ObjectInfo[objectid][oz];
  267. return 1;
  268. }
  269. else
  270. {
  271. return 0;
  272. }
  273. }
  274.  
  275. stock F_SetObjectRot(objectid, Float:rox, Float:roy, Float:roz)
  276. {
  277. if(F_IsValidObject(objectid))
  278. {
  279. ObjectInfo[objectid][orox] = rox;
  280. ObjectInfo[objectid][oroy] = roy;
  281. ObjectInfo[objectid][oroz] = roz;
  282. for(new playerid; playerid<MAX_PLAYERS; playerid++)
  283. {
  284. if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid) && ObjectInfo[objectid][ObjectCreated][playerid] == true)
  285. {
  286. SetPlayerObjectRot(playerid, ObjectInfo[objectid][ObjectID][playerid], rox, roy, roz);
  287. }
  288. }
  289. return 1;
  290. }
  291. return 0;
  292. }
  293.  
  294. stock F_GetObjectRot(objectid, &Float:rox, &Float:roy, &Float:roz)
  295. {
  296. if(F_IsValidObject(objectid))
  297. {
  298. rox = ObjectInfo[objectid][orox];
  299. roy = ObjectInfo[objectid][oroy];
  300. roz = ObjectInfo[objectid][oroz];
  301. return 1;
  302. }
  303. else
  304. {
  305. return 0;
  306. }
  307. }
  308.  
  309. stock F_RefreshObjects(playerid)
  310. {
  311. if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
  312. {
  313. RefreshObjects[playerid] = true;
  314. new Float:x, Float:y, Float:z;
  315. GetPlayerPos(playerid, x, y, z);
  316. F_PlayerObjectUpdate(playerid, x, y, z);
  317. return 1;
  318. }
  319. return 0;
  320. }
  321.  
  322. stock F_Streamer_OnPlayerConnect(playerid)
  323. {
  324. for(new objectid; objectid<F_MAX_OBJECTS; objectid++)
  325. {
  326. ObjectInfo[objectid][ObjectCreated][playerid] = false;
  327. }
  328. OldX[playerid] = 999999999.99;
  329. OldY[playerid] = 999999999.99;
  330. OldZ[playerid] = 999999999.99;
  331. RefreshObjects[playerid] = false;
  332. return 1;
  333. }
  334.  
  335. public F_ObjectUpdate(bool:DontCheckDistance)
  336. {
  337. new Float:ObjDistance[F_MAX_OBJECTS];
  338. new Closest[ObjectsToStream];
  339. new ObjectArr[F_MAX_OBJECTS];
  340. new nr;
  341. new bool:Firstloop;
  342. new bool:DontDestroy[F_MAX_OBJECTS];
  343.  
  344. for(new playerid; playerid<MAX_PLAYERS; playerid++)
  345. {
  346. if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
  347. {
  348. if(!IsPlayerInRangeOfPoint(playerid, 1.0, OldX[playerid], OldY[playerid], OldZ[playerid]) || DontCheckDistance)
  349. {
  350. GetPlayerPos(playerid, OldX[playerid], OldY[playerid], OldZ[playerid]);
  351.  
  352. nr = 0;
  353. for(new objectid; objectid<F_MAX_OBJECTS; objectid++)
  354. {
  355. if(F_IsValidObject(objectid))
  356. {
  357. ObjDistance[objectid] = floatsqroot(floatpower(floatsub(ObjectInfo[objectid][ox],OldX[playerid]),2)+floatpower(floatsub(ObjectInfo[objectid][oy],OldY[playerid]),2)+floatpower(floatsub(ObjectInfo[objectid][oz],OldZ[playerid]),2));
  358. if(floatcmp(ObjDistance[objectid], StreamRange) == -1)
  359. {
  360. ObjectArr[nr] = objectid;
  361. nr++;
  362. }
  363. }
  364. }
  365.  
  366. Closest = "";
  367.  
  368. if(nr > ObjectsToStream)
  369. {
  370. for(new loop; loop<ObjectsToStream; loop++)
  371. {
  372. Firstloop = true;
  373. for(new objectid; objectid<nr; objectid++)
  374. {
  375. if((ObjDistance[ObjectArr[objectid]] != 999999999.99) && ((floatcmp(ObjDistance[ObjectArr[objectid]], ObjDistance[Closest[loop]]) == -1) || Firstloop))
  376. {
  377. Firstloop = false;
  378. Closest[loop] = ObjectArr[objectid];
  379. }
  380. }
  381. ObjDistance[Closest[loop]] = 999999999.99;
  382. }
  383. }
  384. else
  385. {
  386. for(new objectid; objectid<nr; objectid++)
  387. {
  388. Closest[objectid] = ObjectArr[objectid];
  389. }
  390. }
  391.  
  392. for(new objectid; objectid<F_MAX_OBJECTS; objectid++) { DontDestroy[objectid] = false; }
  393. for(new objectid; objectid<ObjectsToStream && objectid<nr; objectid++)
  394. {
  395. DontDestroy[Closest[objectid]] = true;
  396. }
  397.  
  398. for(new objectid; objectid<F_MAX_OBJECTS; objectid++)
  399. {
  400. if(ObjectInfo[objectid][ObjectCreated][playerid] == true && DontDestroy[objectid] == false)
  401. {
  402. DestroyPlayerObject(playerid, ObjectInfo[objectid][ObjectID][playerid]);
  403. ObjectInfo[objectid][ObjectCreated][playerid] = false;
  404. }
  405. }
  406.  
  407. for(new loop; loop<ObjectsToStream && loop<nr; loop++)
  408. {
  409. if(ObjectInfo[Closest[loop]][ObjectCreated][playerid] == false)
  410. {
  411. ObjectInfo[Closest[loop]][ObjectID][playerid] = CreatePlayerObject(playerid, ObjectInfo[Closest[loop]][ModelID], ObjectInfo[Closest[loop]][ox], ObjectInfo[Closest[loop]][oy], ObjectInfo[Closest[loop]][oz], ObjectInfo[Closest[loop]][orox], ObjectInfo[Closest[loop]][oroy], ObjectInfo[Closest[loop]][oroz], ObjectInfo[Closest[loop]][ovdist]);
  412. ObjectInfo[Closest[loop]][ObjectCreated][playerid] = true;
  413. }
  414. }
  415. }
  416. }
  417. }
  418. }
  419.  
  420. stock F_ObjectUpdateForAll()
  421. {
  422. F_ObjectUpdate(true);
  423. }
  424.  
  425. stock F_PlayerObjectUpdate(playerid, Float:x, Float:y, Float:z)
  426. {
  427. if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
  428. {
  429. OldX[playerid] = x;
  430. OldY[playerid] = y;
  431. OldZ[playerid] = z;
  432.  
  433. new nr;
  434. new Float:ObjDistance[F_MAX_OBJECTS];
  435. new ObjectArr[F_MAX_OBJECTS];
  436. for(new objectid; objectid<F_MAX_OBJECTS; objectid++)
  437. {
  438. if(F_IsValidObject(objectid))
  439. {
  440. ObjDistance[objectid] = floatsqroot(floatpower(floatsub(ObjectInfo[objectid][ox],x),2)+floatpower(floatsub(ObjectInfo[objectid][oy],y),2)+floatpower(floatsub(ObjectInfo[objectid][oz],z),2));
  441. if(floatcmp(ObjDistance[objectid], StreamRange) == -1)
  442. {
  443. ObjectArr[nr] = objectid;
  444. nr++;
  445. }
  446. }
  447. }
  448.  
  449. new Closest[ObjectsToStream];
  450.  
  451. if(nr > ObjectsToStream)
  452. {
  453. for(new loop; loop<ObjectsToStream; loop++)
  454. {
  455. new bool:Firstloop = true;
  456. for(new objectid; objectid<nr; objectid++)
  457. {
  458. if((ObjDistance[ObjectArr[objectid]] != 999999999.99) && ((floatcmp(ObjDistance[ObjectArr[objectid]], ObjDistance[Closest[loop]]) == -1) || Firstloop))
  459. {
  460. Firstloop = false;
  461. Closest[loop] = ObjectArr[objectid];
  462. }
  463. }
  464. ObjDistance[Closest[loop]] = 999999999.99;
  465. }
  466. }
  467. else
  468. {
  469. for(new objectid; objectid<nr; objectid++)
  470. {
  471. Closest[objectid] = ObjectArr[objectid];
  472. }
  473. }
  474.  
  475. new bool:DontDestroy[F_MAX_OBJECTS];
  476. for(new objectid; objectid<ObjectsToStream && objectid<nr; objectid++)
  477. {
  478. DontDestroy[Closest[objectid]] = true;
  479. }
  480.  
  481. for(new objectid; objectid<F_MAX_OBJECTS; objectid++)
  482. {
  483. if(ObjectInfo[objectid][ObjectCreated][playerid] == true && (DontDestroy[objectid] == false || RefreshObjects[playerid] == true))
  484. {
  485. DestroyPlayerObject(playerid, ObjectInfo[objectid][ObjectID][playerid]);
  486. ObjectInfo[objectid][ObjectCreated][playerid] = false;
  487. }
  488. }
  489. RefreshObjects[playerid] = false;
  490.  
  491. for(new loop; loop<ObjectsToStream && loop<nr; loop++)
  492. {
  493. if(ObjectInfo[Closest[loop]][ObjectCreated][playerid] == false)
  494. {
  495. ObjectInfo[Closest[loop]][ObjectID][playerid] = CreatePlayerObject(playerid, ObjectInfo[Closest[loop]][ModelID], ObjectInfo[Closest[loop]][ox], ObjectInfo[Closest[loop]][oy], ObjectInfo[Closest[loop]][oz], ObjectInfo[Closest[loop]][orox], ObjectInfo[Closest[loop]][oroy], ObjectInfo[Closest[loop]][oroz], ObjectInfo[Closest[loop]][ovdist]);
  496. ObjectInfo[Closest[loop]][ObjectCreated][playerid] = true;
  497. }
  498. }
  499. }
  500. }
  501. #define SetPlayerPos F_SetPlayerPos
  502. stock F_SetPlayerPos(playerid, Float:x, Float:y, Float:z)
  503. {
  504. F_PlayerObjectUpdate(playerid, x, y, z);
  505. SetPlayerPos(playerid, x, y, z);
  506. }
  507.  
  508. stock SetXmasTree(Float:x,Float:y,Float:z)
  509. {
  510. for(new i = 0; i < sizeof(Treepos); i++)
  511. {
  512. if(Treepos[i][XmasTreeX] == 0)
  513. {
  514. Treepos[i][XmasTreeX]=1;
  515. Treepos[i][XmasX]=x;
  516. Treepos[i][XmasY]=y;
  517. Treepos[i][XmasZ]=z;
  518. Treepos[i][XmasObject1] = F_CreateObject(19076, x, y, z-1.0,0,0,300);//xmas tree
  519. Treepos[i][XmasObject2] = F_CreateObject(19054, x, y+1.0, z-0.4,0,0,300);//XmasBox1
  520. Treepos[i][XmasObject3] = F_CreateObject(19058, x+1.0, y, z-0.4,0,0,300);//XmasBox5
  521. Treepos[i][XmasObject4] = F_CreateObject(19056, x, y-1.0, z-0.4,0,0,300);//XmasBox3
  522. Treepos[i][XmasObject5] = F_CreateObject(19057, x-1.0, y, z-0.4,0,0,300);//XmasBox4
  523. Treepos[i][XmasObject6] = F_CreateObject(19058, x-1.5, y+1.5, z-1.0,0,0,300);//XmasBox5
  524. Treepos[i][XmasObject7] = F_CreateObject(19055, x+1.5, y-1.5, z-1.0,0,0,300);//XmasBox2
  525. Treepos[i][XmasObject8] = F_CreateObject(19057, x+1.5, y+1.5, z-1.0,0,0,300);//XmasBox4
  526. Treepos[i][XmasObject9] = F_CreateObject(19054, x-1.5, y-1.5, z-1.0,0,0,300);//XmasBox1
  527. Treepos[i][XmasObject10] = F_CreateObject(3526, x, y, z-1.0,0,0,300);//Airportlight - for flashing affect
  528. return 1;
  529. }
  530. }
  531. return 0;
  532. }
  533.  
  534. stock DeleteAllXmasTree()
  535. {
  536. for(new i = 0; i < sizeof(Treepos); i++)
  537. {
  538. if(Treepos[i][XmasTreeX] == 1)
  539. {
  540. Treepos[i][XmasTreeX]=0;
  541. Treepos[i][XmasX]=0.0;
  542. Treepos[i][XmasY]=0.0;
  543. Treepos[i][XmasZ]=0.0;
  544. F_DestroyObject(Treepos[i][XmasObject1]);
  545. F_DestroyObject(Treepos[i][XmasObject2]);
  546. F_DestroyObject(Treepos[i][XmasObject3]);
  547. F_DestroyObject(Treepos[i][XmasObject4]);
  548. F_DestroyObject(Treepos[i][XmasObject5]);
  549. F_DestroyObject(Treepos[i][XmasObject6]);
  550. F_DestroyObject(Treepos[i][XmasObject7]);
  551. F_DestroyObject(Treepos[i][XmasObject8]);
  552. F_DestroyObject(Treepos[i][XmasObject9]);
  553. F_DestroyObject(Treepos[i][XmasObject10]);
  554. }
  555. }
  556. return 0;
  557. }
  558.  
  559. stock DeleteClosestXmasTree(playerid)
  560. {
  561. for(new i = 0; i < sizeof(Treepos); i++)
  562. {
  563. if(IsPlayerInRangeOfPoint(playerid, 3.0, Treepos[i][XmasX], Treepos[i][XmasY], Treepos[i][XmasZ]))
  564. {
  565. if(Treepos[i][XmasTreeX] == 1)
  566. {
  567. Treepos[i][XmasTreeX]=0;
  568. Treepos[i][XmasX]=0.0;
  569. Treepos[i][XmasY]=0.0;
  570. Treepos[i][XmasZ]=0.0;
  571. F_DestroyObject(Treepos[i][XmasObject1]);
  572. F_DestroyObject(Treepos[i][XmasObject2]);
  573. F_DestroyObject(Treepos[i][XmasObject3]);
  574. F_DestroyObject(Treepos[i][XmasObject4]);
  575. F_DestroyObject(Treepos[i][XmasObject5]);
  576. F_DestroyObject(Treepos[i][XmasObject6]);
  577. F_DestroyObject(Treepos[i][XmasObject7]);
  578. F_DestroyObject(Treepos[i][XmasObject8]);
  579. F_DestroyObject(Treepos[i][XmasObject9]);
  580. F_DestroyObject(Treepos[i][XmasObject10]);
  581. return 1;
  582. }
  583. }
  584. }
  585. return 0;
  586. }
  587. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement