procedure static void check_dodge (edict_t *self, vec3_t start, vec3_t dir, int speed);
var
  end_,
  v    : vec3_t;
  tr   : trace_t;
  eta  : float;begin
  // easy mode only ducks one quarter the time
  if (skill.value = 0) then    if (random() > 0.25) then      Exit;  VectorMA (start, 8192, dir, end_);  tr := gi.trace (start, NULL, NULL, end_, self, MASK_SHOT);
  if ( (tr.ent) AND ((tr.ent.svflags AND SVF_MONSTER) <> 0) AND
       (tr.ent.health > 0) AND (tr.ent.monsterinfo.dodge) AND infront(tr.ent, self) ) then
  begin
    VectorSubtract (tr.endpos, start, v);
    eta := (VectorLength(v) - tr.ent.maxs[0]) / speed;
    tr.ent.monsterinfo.dodge (tr.ent, self, eta);
  end;
end;

解决方案 »

  1.   

    Quake2的源码,g_weapon.pas文件 居然还有include
      

  2.   

    procedure static void  
    不明白VOID 是啥............
    C++中的哪个?
      

  3.   

    C++中无返回值就用void,这看起了貌似是C++/PASCAL混合体,形参的用法都是。。
      

  4.   


    你用 C++ Builder  的頭加上DELPHI的尾吧。
      

  5.   


    Type 
      INT = Inetger;:)
      

  6.   

    不对吧
    delphi 2007 中加了 static 就编译不过去了,更不要说void 了!