L L4D2node

CVoteController::CancelCurrentVote

0x00b3fff0 · 267 bytes · __thiscall

_ZN15CVoteController17CancelCurrentVoteEv

Decompiled

undefined (1 param)

/* CVoteController::CancelCurrentVote() */

void __thiscall CVoteController::CancelCurrentVote(CVoteController *this)

{
  int *piVar1;
  longdouble lVar2;
  
  if (*(int *)(this + 0x440) != -1) {
    NotifyVoteFailed(this);
    piVar1 = *(int **)(*(int *)(this + 0x540) + *(int *)(this + 0x440) * 4);
    (**(code **)(*piVar1 + 0x14))(piVar1);
    if (*(float *)(this + 0x45c) != -1.0) {
      (**(code **)(*(int *)(this + 0x454) + 4))(this + 0x454,this + 0x45c);
      *(undefined4 *)(this + 0x45c) = 0xbf800000;
    }
    lVar2 = (longdouble)CountdownTimer::Now();
    if ((float)lVar2 + 5.0 != *(float *)(this + 0x4b4)) {
      (**(code **)(*(int *)(this + 0x4ac) + 4))(this + 0x4ac,this + 0x4b4);
      *(float *)(this + 0x4b4) = (float)lVar2 + 5.0;
    }
    if (*(float *)(this + 0x4b0) != 5.0) {
      (**(code **)(*(int *)(this + 0x4ac) + 4))(this + 0x4ac,this + 0x4b0);
      *(undefined4 *)(this + 0x4b0) = 0x40a00000;
      return;
    }
  }
  return;
}

SourceMod gamedata

paste into addons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)

Just a Signatures{} block, ready to drop into a gamedata file. Wire it up in your plugin however you like - SDKCall, DHooks, raw memory ops, or anything else.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)