Mirage Source
http://web.miragesource.net/forums/

Map Respawn
http://web.miragesource.net/forums/viewtopic.php?f=193&t=5322
Page 1 of 1

Author:  Anthony [ Fri Mar 27, 2009 6:07 pm ]
Post subject:  Map Respawn

In a freshly downloaded MS4 the map respawns even when players on are the map.

Author:  Matt [ Fri Mar 27, 2009 6:10 pm ]
Post subject:  Re: Map Respawn

Anthony wrote:
In a freshly downloaded MS4 the map respawns even when players on are the map.


Yupp. Well, the items do. I dunno about the rest.

Author:  Anthony [ Fri Mar 27, 2009 6:15 pm ]
Post subject:  Re: Map Respawn

Private Sub UpdateMapSpawnItems()

Find:

Code:
' Make sure no one is on the map when it respawns
        If Not PlayersOnMap(y) Then


Change it to:

Code:
' Make sure no one is on the map when it respawns
        If PlayersOnMap(y) = NO Then


Fixed.

Author:  GIAKEN [ Fri Mar 27, 2009 6:31 pm ]
Post subject:  Re: Map Respawn

It would be better to just make PlayersOnMap a boolean.

(boolean is faster than byte)

Author:  Doomy [ Fri Mar 27, 2009 6:57 pm ]
Post subject:  Re: Map Respawn

when can a boolon be used anywhere a byte can or in certain instances? ive nvr used it before

Author:  Rian [ Fri Mar 27, 2009 7:02 pm ]
Post subject:  Re: Map Respawn

Not really. A byte is a variable with a value between 0 and 255, (256 total)

A boolean is a variable with a true or false value

Public PlayersOnMap as Boolean

Usage:

Toggle - PlayersOnMap = True or PlayersOnMap = False

Check - If PlayersOnMap = True Then or If PlayersOnMap = False Then

Author:  Doomy [ Fri Mar 27, 2009 7:33 pm ]
Post subject:  Re: Map Respawn

ahh i get it

Author:  GIAKEN [ Fri Mar 27, 2009 7:39 pm ]
Post subject:  Re: Map Respawn

Most of the checks we do are If Byte = 1 Or Byte = 0...those need to be Boolean = True or Boolean = False.

There's a small downside, Booleans take more memory than Bytes. Not that much more, but it's still considered a down side. Speed over memory usage.

Author:  Matt [ Fri Mar 27, 2009 7:42 pm ]
Post subject:  Re: Map Respawn

GIAKEN wrote:
Most of the checks we do are If Byte = 1 Or Byte = 0...those need to be Boolean = True or Boolean = False.

There's a small downside, Booleans take more memory than Bytes. Not that much more, but it's still considered a down side. Speed over memory usage.


Takes two bytes, I believe.

Author:  Labmonkey [ Sun Mar 29, 2009 7:55 pm ]
Post subject:  Re: Map Respawn

Its such a minor difference (in speed, and memory) does it really matter?

Author:  GIAKEN [ Mon Mar 30, 2009 12:26 am ]
Post subject:  Re: Map Respawn

Yeah any loss is still a loss. If I lose 2$ instead of 1$...oh it's not that much of a loss, but still that's 50%...

You're looking at it like you're just fucking lazy. Any optimization is better, no matter 10 milliseconds faster or 1000 milliseconds faster is something that should be done.

Author:  KruSuPhy [ Mon Mar 30, 2009 12:50 am ]
Post subject:  Re: Map Respawn

GIAKEN wrote:
Yeah any loss is still a loss. If I lose 2$ instead of 1$...oh it's not that much of a loss, but still that's 50%...

You're looking at it like you're just fucking lazy. Any optimization is better, no matter 10 milliseconds faster or 1000 milliseconds faster is something that should be done.

Wouldn't that be a 100% loss?

Author:  Pbcrazy [ Mon Mar 30, 2009 1:00 am ]
Post subject:  Re: Map Respawn

no...
2$ = 100%
-1
1$ = 50%

aka: 1$ is 1/2 of 2$, and 50% is 1/2 of 100%

Author:  Doomy [ Mon Mar 30, 2009 1:23 am ]
Post subject:  Re: Map Respawn

but if your looking at it from the small point of view wouldnt it be 100% loss

Author:  Matt [ Mon Mar 30, 2009 1:24 am ]
Post subject:  Re: Map Respawn

Technically, losing $1 would be a 100% loss. Losing $2 would be a 200% loss.

Since those are the only variants involved.

Author:  GIAKEN [ Mon Mar 30, 2009 1:25 am ]
Post subject:  Re: Map Respawn

Who cares? The point is any optimization is good.

Author:  james1992_2006 [ Mon Mar 30, 2009 1:25 am ]
Post subject:  Re: Map Respawn

Doomy wrote:
but if your looking at it from the small point of view wouldnt it be 100% loss

Edit: Nvm, someone delete this post.

Author:  Matt [ Mon Mar 30, 2009 1:26 am ]
Post subject:  Re: Map Respawn

GIAKEN wrote:
Who cares? The point is any optimization is good.


We have to take this thread off topic. It's the MS way. Quit trying to make us think like programmers, damnit! :D

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/