Duke4.net Forums: Numsprites var inaccurate - Duke4.net Forums

Jump to content

Hide message Show message
Welcome to the Duke4.net Forums!

Register an account now to get access to all board features. After you've registered and logged in, you'll be able to create topics, post replies, send and receive private messages, disable the viewing of ads and more!

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Numsprites var inaccurate

User is offline   Trooper Dan 

  • Duke Plus Developer
  • 2,080

#1

http://wiki.eduke32....wiki/Numsprites

My code had been depending on this variable being accurate, but apparently it's not! In one map, the var had a value of 407 when there were actually over 600 sprites in the map (which can be easily verified in mapster). I was using Numsprites to check when to stop processing sprites during EVENT_ENTERLEVEL. I could see during the game that a large number of sprites were not being processed by my code. As a substitute, my code now checks all 16384 sprites and just ignores those with a statnum of 1024 -- it works fine now.

EDIT: And before anyone asks -- yes, EVENT_LOADACTOR would be a more natural place to put code that processes sprites before the game starts, but for reasons I won't go into, the code is currently in EVENT_ENTERLEVEL.


This post has been edited by Trooper Dan: 20 February 2017 - 03:55 AM

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks are property of their respective owners and all comments are owned by their posters. Yes, our forum uses cookies. © 2004-2017 Duke4.net and Voidpoint, LLC

Enter your sign in name and password


Sign in options