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;
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;
不明白VOID 是啥............
C++中的哪个?
你用 C++ Builder 的頭加上DELPHI的尾吧。
Type
INT = Inetger;:)
delphi 2007 中加了 static 就编译不过去了,更不要说void 了!