![]() |
SetHighMaxMap - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17) +---- Thread: SetHighMaxMap (/showthread.php?tid=452) |
SetHighMaxMap - William - 07-12-2006 I know this is useless, but my internet was down yesterday so I thought I should do something: Code: Public Sub SetHighMaxMap() This could be usefull for Engines (not games), cause in a engine you might set the max_maps = 1000, and you only use 15 maps.. ![]() This can easily be done for all the different MAX_ thingys, but I don't think its a good idea. Just thought I should post it. ![]() ps. some types are needed for it to work. At least I have my head focused at optimizations ![]() - GodSentDeath - 07-12-2006 What if for whatever reason the map doesn't use tile 0/0 and keeps it blank causing it to not be detected by this code? Or even if the tile is used but it's used by something other then ground? Just some thoughts, but nice little code either way =) - William - 07-12-2006 Well under: Code: If HighMap(i).HighTile(0, 0).Ground 0 Then Code: If HighMap(i).HighTile(0, 0).Mask 0 Then Code: If HighMap(i).HighTile(0, 0).Fringe 0 Then - pingu - 07-12-2006 How many "For i = 1 To MAX_MAPS" loops are there? - William - 07-12-2006 I don't know, havn't counted, but I know there are one in the game loop server side. And there some client side too ![]() - Dragoons Master - 08-12-2006 IMO the most important of all MS's "For" is the AI one, it executes all the time and if it's smaller than max_maps it can speed up a lot the server. Re: SetHighMaxMap - GodSentDeath - 08-12-2006 Not that I know if this works for sure, I don't have my VB installed to test it and I haven't touched coding in a long time >< but stealing Spodi's example for clearing players try this: Code: Public Sub SetHighMaxMap() Code: Dim EmptyMap As Maprec Code: If HighMap(i).HighTile(0, 0).Ground 0 Then Code: If HighMap(i) EmptyMap Then Just an idea, don't know if it'll work =) Seems logical enough though =P - William - 08-12-2006 Yeah, it does seem logical =P Seems to work fine from what I can see. Cant try it now thought. Is it worth making a tut from? I can do it for all the different MAX_ if its usefull. - GodSentDeath - 09-12-2006 It'd be a nice little tutorial if you did it for a few of the "max" objects. But you'd have to make it work with the current version of MS meaning you'd have to tell them where to define the HIGH_MAX_MAPS variable, etc etc! Otherwise, yeah, go for it =) - William - 10-12-2006 Yeah I know. Well I know what Grim told me. It's never good to use non-constant variables for loops. And I don't know what speed changes it will be. But I guess I can complete a tutorial for it. |