Archived copy of war3source.com, the War3Source forum (2009–2020), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2012-10-24 (original capture). Forum · All archived topics · Wiki · Bug tracker · Blog
Chat

War3:Source
October 24, 2012, 09:14:22 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Download: http://war3source.com/index.php?board=9.0
What is War3Source?: http://war3source.com/index.php?topic=200.0
Sample Stats: http://war3source.com/war3stats
Steam Community Group: http://steamcommunity.com/groups/war3source
War3Source SVN Checkout: http://ownageclan.com/svn/war3source/
War3Source servers: http://www.game-monitor.com/search.php?vars=war3_version=
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: OnWar3EventSpawn  (Read 196 times)
zero
Full Member
***
Posts: 191



View Profile WWW Email
« on: August 15, 2011, 04:14:38 PM »

I would assume that this is supposed to only trigger when a user actually spawns. However it can and does trigger when a user is dead before they ever spawn. For example this event will trigger when a user joins the server.

Logically users could filter this by running a check within OnWar3EventSpawn to see if the user is connected and alive ect. However, I assume that an event called OnWar3EventSpawn is intended to do this already.

Please let me know if this is a real glitch or if we are supposed to be running manual checks.

On another note, do we need public W3ONLY(){} in our code?
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2045



View Profile WWW Email
« Reply #1 on: August 15, 2011, 04:15:56 PM »

OnWar3EventSpawn fires when player joins the game and i dont know why, IsPlayerAlive(client) is true even though the player just joined and is not alive

this is the game engine's problem, not war3's
Logged

DarkEnergy
zero
Full Member
***
Posts: 191



View Profile WWW Email
« Reply #2 on: August 15, 2011, 09:31:07 PM »

Perhaps if the check was delayed .1 seconds it would work?
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2045



View Profile WWW Email
« Reply #3 on: August 15, 2011, 09:36:23 PM »

what are you using it for?
Logged

DarkEnergy
zero
Full Member
***
Posts: 191



View Profile WWW Email
« Reply #4 on: August 15, 2011, 10:41:24 PM »

Anything that occurs when a user spawns such as setting effects and player settings for a race. I just want to prevent code from running when it is not supposed to in order to prevent any possible strange behavior and or crashes.

I know that if spawn effects are not delayed about .5 seconds they will not appear correctly at spawn for example. In addition some effects can crash the server if not delayed .5 seconds from  OnWar3EventSpawn
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2045



View Profile WWW Email
« Reply #5 on: August 16, 2011, 07:08:22 AM »

you can try using a 0.1 delay and checking alive
or just check if their race is >0
or check team >0
Logged

DarkEnergy
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!