Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Map Respawn
#1
In a freshly downloaded MS4 the map respawns even when players on are the map.
Reply
#2
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.
Reply
#3
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.
Reply
#4
It would be better to just make PlayersOnMap a boolean.

(boolean is faster than byte)
Reply
#5
when can a boolon be used anywhere a byte can or in certain instances? ive nvr used it before
Reply
#6
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
Reply
#7
ahh i get it
Reply
#8
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.
Reply
#9
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.
Reply
#10
Its such a minor difference (in speed, and memory) does it really matter?
Reply
#11
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.
Reply
#12
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?
Reply
#13
no...
2$ = 100%
-1
1$ = 50%

aka: 1$ is 1/2 of 2$, and 50% is 1/2 of 100%
Reply
#14
but if your looking at it from the small point of view wouldnt it be 100% loss
Reply
#15
Technically, losing $1 would be a 100% loss. Losing $2 would be a 200% loss.

Since those are the only variants involved.
Reply
#16
Who cares? The point is any optimization is good.
Reply
#17
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.
Reply
#18
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! Big Grin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)