mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-12 23:14:36 +01:00
limit object indexes
This commit is contained in:
@@ -129,6 +129,11 @@ func (s *Stage) GetName() string {
|
||||
|
||||
func (s *Stage) NextObjectID() uint32 {
|
||||
s.objectIndex = s.objectIndex + 1
|
||||
// Objects beyond 127 do not duplicate correctly
|
||||
// Indexes 0 and 127 does not update position correctly
|
||||
if s.objectIndex == 127 {
|
||||
s.objectIndex = 1
|
||||
}
|
||||
bf := byteframe.NewByteFrame()
|
||||
bf.WriteUint8(0)
|
||||
bf.WriteUint8(s.objectIndex)
|
||||
|
||||
Reference in New Issue
Block a user