06-14-2013, 10:39 PM
(06-12-2013, 05:45 PM)zort Wrote: I have here a patch that adds a previously unknown field in the sObject struct:Currently there is not a preferred way to submit patches. Basically whatever works.
I haven't actually tested this change. Please tell me if this is not the preferred way to submit patches.Code:--- sgame.h 2013-06-12 13:18:41.033551073 -0400
+++ my_sgame.h 2013-06-12 13:40:13.569301698 -0400
@@ -213,7 +213,8 @@
int frame3;
int frame4;
char facing;
- char unkwn3[15];
+ char unkwn3[11];
+ int wait_counter;
int ccatcher;
int ctimer;
int weapon_type;
EDIT: Changed name from delay_counter to wait_counter to reflect naming in data files :S
It's the time before you go to the next frame?
(06-14-2013, 07:21 PM)zort Wrote: Could you enable the math add-on (http://www.angelcode.com/angelscript/sdk..._math.html)?Will do.
(06-14-2013, 07:21 PM)zort Wrote: Also, you know how for some reason you can't handle Frame (or Itr or whatever) thingies?:You actually can but it is quite unintuitive the way it works.
Code:Frame x = game.objects[self.num].data.frames[0];
=>
ERROR : Data type can't be 'const Frame'
In the above code you are declaring a new Frame object and setting it equal to an existing one. First of all if you could do that it would be wasteful in resources as the data is already stored in memory somewhere else, and on top of that you aren't allowed to do so anyway because I haven't registered a factory function for the types anyway.
The way to do it is by using handles (signified by using an @ symbol).
Also since all of the API objects are declared as "const" you will have to use "const" as well.
The following code loops through standing frames and displays their bodys:
CPP-Code:
int n = 0; for(const Frame <DVZ_ME#0> = target.data.frames[0];;@frame = target.data.frames[frame.next]){ print("<frame> "+n+"\n"); for(int i = 0;i<frame.bdy_count;++i){ const Bdy <DVZ_ME#1> = frame.bdys[i]; print(" bdy: \n" " kind: "+bdy.kind+" x: "+bdy.x+" y: "+bdy.y+" w: "+bdy.w+" h: "+bdy.h+"\n" " bdy_end:\n"); } print("<frame_end>\n\n"); n = frame.next; if(n >= 400 || n <= 0 || !target.data.frames[n].exists) break; } |
(06-14-2013, 07:21 PM)zort Wrote: Also:Will add that as well.
Code:enum State {
STANDING,WALKING,RUNNING,ATTACKING,JUMPING,DASHING,ROWING,DEFENDING,
BROKEN_DEFENCE,CATCHING,CAUGHT,INJURED,FALLING,FROZEN,LYING,OTHER,DoP,
DRINKING,BURNING,FIRERUNNING,LOUIS_DASH_ATTACKING=100,DEEP_STRAFING=301,
TELEPORTING_ENEMY=400,TELEPORTING_FRIEND=401,RUDOLF_TRANSFORMING=500,
RUDOLF_TRANSFORMING2=501,SELF_HEALING=1700,
}
Age ratings for movies and games (and similar) have never been a good idea.
One can learn a lot from reinventing wheels.
An unsound argument is not the same as an invalid one.
volatile in C++ does not mean thread-safe.
Do not make APIs unnecessarily asynchronous.
Make C++ operator > again
Trump is an idiot.
One can learn a lot from reinventing wheels.
An unsound argument is not the same as an invalid one.
volatile in C++ does not mean thread-safe.
Do not make APIs unnecessarily asynchronous.
Make C++ operator > again
Trump is an idiot.