mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-02-06 18:17:01 +01:00
limit object indexes
This commit is contained in:
@@ -129,6 +129,11 @@ func (s *Stage) GetName() string {
|
|||||||
|
|
||||||
func (s *Stage) NextObjectID() uint32 {
|
func (s *Stage) NextObjectID() uint32 {
|
||||||
s.objectIndex = s.objectIndex + 1
|
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 := byteframe.NewByteFrame()
|
||||||
bf.WriteUint8(0)
|
bf.WriteUint8(0)
|
||||||
bf.WriteUint8(s.objectIndex)
|
bf.WriteUint8(s.objectIndex)
|
||||||
|
|||||||
Reference in New Issue
Block a user