| Author | Message | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| map storm release updated12/28/10
I thought you guys might like this as much as I do!
in map.cpp around line 360 under this->pk = PacketProcessor::Number(buf[0]) == 3; add SAFE_SEEK(fh, 0x20, SEEK_SET); in map.cpp under void Map::Effect(int effect, int param) void Map::Storm() in map.hpp under public: find bool pk; add here unsigned char effect; in map.hpp find void Effect(int effect, int param); add here void Storm(); in world.cpp find void world_timed_save(void *world_void) add this here void world_effect(void *world_void)// to do set up quake timers if (this->config["MapStorm"]) in your config.ini find ## TimedSave (number) add above TimedSave ## MapStorm (number)
|
| Re: map storm release
I got this Error. C:\Users\Alek\Desktop\trunk\src\util.hpp:1186: error: expected ';' before ')' token there isn't a line 1186..
|
| Re: map storm release
ye ill post pics and about the error it looks like util.hpp which this doesnt have anything to do with whats before that error ? maybe post the whole log, errors and warns! It changes to there is like 10 different patterns that it does!
|
| Re: map storm release
That's all it said after I compiled :X..
|
| Re: map storm release
I have no clue on the error because usually the errors dont point to the problem but when it compiles it shows what its compiling so just see what the last thing it compiles before the error is and post that
|
| Re: map storm release
Wow thanks for posting this i was going to make something like this. Just one suggestion if you don't mind ... you should make it so you can change the effects for different maps. --- http://www.torn.com/478456
|
| Re: map storm release
nice release insomniac~
|
| Re: map storm release
Should we enter this into the ugliest code of the year. You could have more easily done this simply by using the map effect parameter (not a whole config file for storms listing maps). Once you have decided on a value for storms that isn't currently taken by quakes or map drains, you can then add a simple timer into world.cpp that will produce lightning on a random x/y within the map size. I understand what you have written was a nice attempt and apparently you have put a lot of time into writing code, but I think you need to revise this code quite a bit as the result you seek is far to easy to produce with way less code. This is not the kind of release you offer people to use, it
is the kind you ask people to fix/improve.
|
| Re: map storm release
this is kinda cool release....
--- "With your feet steady and firm on the ground soar high and ignore limitations" -Bladex EOSERV Class : Pixel Artist, Grammar Nazi, Server Owner, Mapping Artist, Server Coder, Test Player, The Game Maker
|
| Re: map storm release
It is pretty ugly, and when i do post the stuff i hope people revise it! It didnt take much time i just had the idea did it and it worked and thought people might want to use it. I will revise it and release finished storm. The main thing i go for is "does it do what I want" yes it doesI appreciate your input Thanks apollo!!
|
| Re: map storm release
Pic:
|
| Re: map storm release
This is how i would go about doing this. Also i verified it does work. This also doesn't require any outside configuration as it's how thunder should be and that's entirely random. There could be much more done to it to make it only trigger the thunder on random maps or what ever else could be
thought of. This way is just so much less code and seems more logical based on real nature :P. Also this checks so it doesn't cast on a wall, chair, etc tile. You can get it here :) Taking it all from the top this is how you would implement it. In map.cpp under: void Map::Effect(int effect, int param) Add: In map.hpp find: void Effect(int effect, int param); Add: void Storm(); In world.cpp under: void world_timed_save(void *world_void) Add: void world_storm(void *world_void) In world.cpp under: TimeEvent *event = new TimeEvent(world_spawn_npcs, this, 1.0, Timer::FOREVER); Add: event = new TimeEvent(world_storm, this, 10.00, Timer::FOREVER); And that should be it :). Credits to this topic owner for parts of the code as i merely rewrote the base Storm() method in the map class. Edit: Also sorry i cant help the odd lines on this post :/ --- ¨°º¤ø„º°¨ Exile Studios ¨°º„ø¤º°¨
|
| Re: map storm release
In map.cpp around line 360: find: SAFE_SEEK(fh, 0x20, SEEK_SET); SAFE_READ(buf, sizeof(char), 1, fh); add this on the line below: this->mapeffect = PacketProcessor::Number(buf[0]); in world.cpp within your function and within a foreach map loop add this in addition to your effect packet: if (map->mapeffect == 7) { *effect packet and random x,y shit goes here } Now all you need to do is set the map effect parameter to 7 with the map editor of your choosing.
|
| Re: map storm release
--- "With your feet steady and firm on the ground soar high and ignore limitations" -Bladex EOSERV Class : Pixel Artist, Grammar Nazi, Server Owner, Mapping Artist, Server Coder, Test Player, The Game Maker
| |


