Results 1 to 10 of 34

Thread: Weapon functions (+ setMoveSpeedScale)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #15
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by filthy_freak_ View Post
    Here are the addresses required to get setg_speed working on 1.0
    I added them last night and included 1.2. I was working on changing g_gravity per player .

    https://github.com/M-itch/libcod/com...dac4ef9608efb7

    Edit: this should block melee and fire for x time (in ms).
    PHP Code:
    void gsc_player_setweaponfiremeleedelay(int id) {
        
    int delay;
        if ( ! 
    stackGetParams("i", &delay)) {
            
    printf("scriptengine> ERROR: gsc_player_setweaponfiremeleedelay(): param \"delay\"[1] has to be an int!\n");
            
    stackPushUndefined();
            return;
        }

        if(
    delay 0) {
            
    printf("scriptengine> ERROR: gsc_player_setweaponfiremeleedelay(): param \"delay\"[1] must be equal or above zero!\n");
            
    stackPushUndefined();
            return;
        }

        
    intweapondelay = (int *)(PLAYERSTATE(id) + 0x34);
        *
    weapondelay delay;

    Last edited by Mitch; 21st May 2015 at 17:37. Reason: code was missing 'void'

  2. The Following User Says Thank You to Mitch For This Useful Post:

    filthy_freak_ (21st May 2015)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •