Вставил в свою карту, всё вроде бы подрихтовал, но фишка в том, что варик не жрёт вот этот блок: pp.vk.me/c837422/v837422003/1d220/MZlh9XqRcc0.jpg
Ругается pjass: pp.vk.me/c837422/v837422003/1d229/MOJZ86yjcDk.jpg
Библиотека ниже.
Ругается pjass: pp.vk.me/c837422/v837422003/1d229/MOJZ86yjcDk.jpg
Библиотека ниже.
//PhysX v1.3 dev2
library PhysX initializer Init
globals //settings
private constant real G = 9.8 //const G
private constant real rev = 0.6 //ReAction Power
private constant real mu = 0.1 //friction coeff
private constant real xi = 0.005 //air friction coeff
private constant real globalTimer = 0.04 //global Timer (don't touch)
private constant string t_bone = "bone_chest" //set rotation to a bone
endglobals
//rev = 1, mu = 0, xi = 0 - perpertuum mobile=)
//System, don't touch without understanding!
globals
private timer mainTimer
private real fps
private group owners1
private group owners2
private PhysXObject array objects
private real ex_G
private real ex_mu
private real ex_xi
private real ex_rev
private real map_minx
private real map_miny
private real map_maxx
private real map_maxy
private location getZloc
private group cont_pick
private string ex_mrk
private integer ex_type_id
private boolean sep
private hashtable hash
private integer sth
PhysXObject lastCreatedPhysX
PhysXObject lastRegisterPhysX
unit lastRegisterContactUnit
endglobals
globals
private unit u
private unit f
private integer i
private real fh
private real th
private real c_z
private real n_z
private real new_x
private real new_y
private real sinx
private real siny
private real at2s
private real vec_sp
endglobals
private function GetFuelSlot takes nothing returns integer
local integer i = 1
local boolean b = false
loop
exitwhen(b)
if objects[i].owner==null then
set b = true
else
set i = i+1
endif
endloop
return i
endfunction
private function GetPhysXIdByUnit takes unit u returns integer
local integer i = 0
if IsUnitInGroup(u,owners1) or IsUnitInGroup(u,owners2) then
set i = LoadInteger(hash,sth,GetHandleId(u))
endif
return i
endfunction
private function RemoveAllByMarkEnum takes nothing returns nothing
local integer i = GetPhysXIdByUnit(GetEnumUnit())
if objects[i].mrk==ex_mrk then
call objects[i].Remove()
endif
endfunction
private function DestroyAllByMarkEnum takes nothing returns nothing
local unit u = GetEnumUnit()
local integer i = GetPhysXIdByUnit(u)
if objects[i].mrk==ex_mrk then
call objects[i].Remove()
call RemoveUnit(u)
endif
set u = null
endfunction
private function RemoveAllOfTypeIdEnum takes nothing returns nothing
local integer i = GetPhysXIdByUnit(GetEnumUnit())
if GetUnitTypeId(objects[i].owner)==ex_type_id then
call objects[i].Remove()
endif
endfunction
private function DestroyAllOfTypeIdEnum takes nothing returns nothing
local unit u = GetEnumUnit()
local integer i = GetPhysXIdByUnit(u)
if GetUnitTypeId(u)==ex_type_id then
call objects[i].Remove()
call RemoveUnit(u)
endif
set u = null
endfunction
private function RemoveAllEnum takes nothing returns nothing
local integer i = GetPhysXIdByUnit(GetEnumUnit())
call objects[i].Remove()
endfunction
private function DestroyAllEnum takes nothing returns nothing
local unit u = GetEnumUnit()
local integer i = GetPhysXIdByUnit(u)
call objects[i].Remove()
call RemoveUnit(u)
set u = null
endfunction
struct PhysXObject
unit owner
real speed_x
real speed_y
real speed_z
real size
string mrk
real t_imp
string func_contact_unit
boolean contact_units
string func_contact_ground
boolean contact_once
string func_full_stop
static method Add takes unit owner, real speed_x, real speed_y, real speed_z, real size, boolean cu, string mrk returns PhysXObject
set i = 0
if owner!=null then
set i = GetFuelSlot()
set objects[i] = PhysXObject.create()
set objects[i].speed_x = fps*speed_x
set objects[i].speed_y = fps*speed_y
set objects[i].speed_z = fps*speed_z
set objects[i].t_imp = 0.0
if size>0.0 then
set objects[i].size = size
else
set objects[i].size = 0.0
endif
set objects[i].owner = owner
call SaveInteger(hash,sth,GetHandleId(owner),i)
if sep then
call GroupAddUnit(owners1,owner)
else
call GroupAddUnit(owners2,owner)
endif
set sep = !sep
set objects[i].func_contact_unit = ""
set objects[i].func_contact_ground = ""
set objects[i].func_full_stop = ""
set objects[i].contact_once = true
set objects[i].contact_units = cu
set objects[i].mrk = mrk
set lastCreatedPhysX = objects[i]
call SetUnitFacing(owner, Atan2(speed_y,speed_x)*bj_RADTODEG)
call SetUnitLookAt(owner, t_bone, owner, objects[i].speed_x*10, objects[i].speed_y*10, objects[i].speed_z*10)
endif
return objects[i]
endmethod
static method AddByPolar takes unit owner, real speed, real ang_xy, real ang_z, real size, boolean cu, string mrk returns PhysXObject
local real polar_x = speed*Cos(ang_xy)
local real polar_y = speed*Sin(ang_xy)
local real polar_z = SquareRoot(polar_x*polar_x+polar_y*polar_y)*Cos(ang_z)
return Add(owner,polar_x,polar_y,polar_z,size,cu,mrk)
endmethod
static method Create takes integer id, player p, real x, real y, real t, real f, real speed_x, real speed_y, real speed_z, real size, boolean cu, boolean unsel, boolean inv, string mrk returns PhysXObject
local unit dummy = CreateUnit(p,id,x,y,t)
local integer ph = 0
if dummy!=null then
set ph = Add(dummy,speed_x,speed_y,speed_z,size,cu,mrk)
call UnitAddAbility(dummy,'Aave')
call UnitRemoveAbility(dummy,'Aave')
call SetUnitFlyHeight(dummy,f,0.0)
if unsel then
call UnitAddAbility(dummy,'Aloc')
call UnitRemoveAbility(dummy,'Aloc')
endif
call SetUnitInvulnerable(dummy,inv)
endif
set dummy = null
return ph
endmethod
static method CreateByPolar takes integer id, player p, real x, real y, real t, real f, real speed, real ang_xy, real ang_z, real size, boolean cu, boolean unsel, boolean inv, string mrk returns PhysXObject
local unit dummy = CreateUnit(p,id,x,y,t)
local integer ph = 0
if dummy!=null then
set ph = AddByPolar(dummy,speed,ang_xy,ang_z,size,cu,mrk)
call UnitAddAbility(dummy,'Aave')
call UnitRemoveAbility(dummy,'Aave')
call SetUnitFlyHeight(dummy,f,0.0)
if unsel then
call UnitAddAbility(dummy,'Aloc')
call UnitRemoveAbility(dummy,'Aloc')
endif
call SetUnitInvulnerable(dummy,inv)
endif
set dummy = null
return ph
endmethod
method Remove takes nothing returns nothing
if this.owner!=null then
if IsUnitInGroup(this.owner,owners1) then
call GroupRemoveUnit(owners1,this.owner)
endif
if IsUnitInGroup(this.owner,owners2) then
call GroupRemoveUnit(owners2,this.owner)
endif
call RemoveSavedInteger(hash,sth,GetHandleId(this.owner))
endif
set this.owner = null
set this.speed_x = 0.0
set this.speed_y = 0.0
set this.speed_z = 0.0
set this.size = 0.0
set this.t_imp = 0.0
set this.func_contact_unit = ""
set this.func_contact_ground = ""
set this.func_full_stop = ""
set this.mrk = ""
call this.destroy()
endmethod
static method RemoveByUnit takes unit u returns nothing
local integer i = GetPhysXIdByUnit(u)
if i>0 then
call objects[i].Remove()
endif
endmethod
method Destroy takes nothing returns nothing
set u = null
set u = this.owner
call this.Remove()
if u!=null then
call RemoveUnit(u)
endif
endmethod
static method DestroyByUnit takes unit u returns nothing
local integer i = 0
if u!=null then
set i = GetPhysXIdByUnit(u)
if i>0 then
call objects[i].Remove()
endif
call RemoveUnit(u)
endif
endmethod
static method RemoveAllByMark takes string mrk returns nothing
set ex_mrk = mrk
call ForGroup(owners1,function RemoveAllByMarkEnum)
call ForGroup(owners2,function RemoveAllByMarkEnum)
endmethod
static method DestroyAllByMark takes string mrk returns nothing
set ex_mrk = mrk
call ForGroup(owners1,function DestroyAllByMarkEnum)
call ForGroup(owners2,function DestroyAllByMarkEnum)
endmethod
static method RemoveAllOfTypeId takes integer id returns nothing
set ex_type_id = id
call ForGroup(owners1,function RemoveAllOfTypeIdEnum)
call ForGroup(owners2,function RemoveAllOfTypeIdEnum)
endmethod
static method DestroyAllOfTypeId takes integer id returns nothing
set ex_type_id = id
call ForGroup(owners1,function DestroyAllOfTypeIdEnum)
call ForGroup(owners2,function DestroyAllOfTypeIdEnum)
endmethod
static method RemoveAll takes nothing returns nothing
call ForGroup(owners1,function RemoveAllEnum)
call ForGroup(owners2,function RemoveAllEnum)
endmethod
static method DestroyAll takes nothing returns nothing
call ForGroup(owners1,function DestroyAllEnum)
call ForGroup(owners2,function DestroyAllEnum)
endmethod
//events
method RegisterContactUnit takes string func returns nothing
set func_contact_unit = func
endmethod
method RegisterContactGround takes string func, boolean once returns nothing
set func_contact_ground = func
set contact_once = once
endmethod
method SetContactGroundOnce takes boolean once returns nothing
set contact_once = once
endmethod
method RegisterFullStop takes string func returns nothing
set func_full_stop = func
endmethod
//end events
method InstantEffect takes string s returns nothing
call DestroyEffect(AddSpecialEffect(s,GetUnitX(this.owner),GetUnitY(this.owner)))
endmethod
endstruct
struct SetOption
static method G takes real r returns nothing
set ex_G = r*10.0
endmethod
static method rev takes real r returns nothing
set ex_rev = r
endmethod
static method mu takes real r returns nothing
set ex_mu = 1-r
endmethod
static method xi takes real r returns nothing
set ex_xi = 1-r
endmethod
static method globalTimer takes real r returns nothing
set fps = r
endmethod
endstruct
function GetUnitZ takes unit u returns real
call MoveLocation(getZloc,GetUnitX(u),GetUnitY(u))
return GetUnitFlyHeight(u)+GetLocationZ(getZloc)
endfunction
private function GetCoordZ takes real x, real y returns real
call MoveLocation(getZloc,x,y)
return GetLocationZ(getZloc)
endfunction
private function EnumObjects takes nothing returns nothing
set u = GetEnumUnit()
set i = GetPhysXIdByUnit(u)
set fh = GetUnitFlyHeight(u)
set c_z = GetCoordZ(GetUnitX(u),GetUnitY(u))
set n_z = GetCoordZ(GetUnitX(u)+objects[i].speed_x,GetUnitY(u)+objects[i].speed_y)
set sinx = Sin(Atan2(GetCoordZ(GetUnitX(u)+objects[i].size,GetUnitY(u))-GetCoordZ(GetUnitX(u)-objects[i].size,GetUnitY(u)),objects[i].size*2.0))
set siny = Sin(Atan2(GetCoordZ(GetUnitX(u),GetUnitY(u)+objects[i].size)-GetCoordZ(GetUnitX(u),GetUnitY(u)-objects[i].size),objects[i].size*2.0))
set objects[i].speed_x = objects[i].speed_x-(objects[i].speed_x*xi*(fps/0.04))
set objects[i].speed_y = objects[i].speed_y-(objects[i].speed_y*xi*(fps/0.04))
set objects[i].speed_z = objects[i].speed_z-(objects[i].speed_z*xi*(fps/0.04))
if fh>=1.0 then
set objects[i].speed_z = objects[i].speed_z-ex_G*fps
else
set objects[i].speed_x = objects[i].speed_x-(objects[i].speed_x*mu*(fps/0.04))
set objects[i].speed_y = objects[i].speed_y-(objects[i].speed_y*mu*(fps/0.04))
if n_z<c_z then
set objects[i].speed_z = objects[i].speed_z+objects[i].t_imp
set objects[i].t_imp = 0.0
endif
if objects[i].speed_z<-5.0 then
set objects[i].speed_z = -objects[i].speed_z*ex_rev
if objects[i].func_contact_ground!="" then
set lastRegisterPhysX = objects[i]
call ExecuteFunc(objects[i].func_contact_ground)
endif
else
if objects[i].speed_z<=0.0 then
set objects[i].speed_z = 0.0
if (objects[i].func_contact_ground!="") and !objects[i].contact_once then
set lastRegisterPhysX = objects[i]
call ExecuteFunc(objects[i].func_contact_ground)
endif
endif
endif
set objects[i].speed_x = objects[i].speed_x-sinx*ex_G*fps
set objects[i].speed_y = objects[i].speed_y-siny*ex_G*fps
endif
if (c_z<n_z) or (c_z-n_z>objects[i].size) then
call SetUnitFlyHeight(u,fh+objects[i].speed_z+(c_z-n_z),0.0)
else
call SetUnitFlyHeight(u,fh+objects[i].speed_z,0.0)
endif
if (objects[i].speed_x>-1.0) and (objects[i].speed_x<1.0) then
set objects[i].speed_x = 0.0
endif
if (objects[i].speed_y>-1.0) and (objects[i].speed_y<1.0) then
set objects[i].speed_y = 0.0
endif
set new_x = GetUnitX(u)+objects[i].speed_x
set new_y = GetUnitY(u)+objects[i].speed_y
if (map_minx>new_x) or (map_maxx<new_x) then
set objects[i].speed_x = -objects[i].speed_x*ex_rev
set new_x = GetUnitX(u)+objects[i].speed_x
endif
if (map_miny>new_y) or (map_maxy<new_y) then
set objects[i].speed_y = -objects[i].speed_y*ex_rev
set new_y = GetUnitY(u)+objects[i].speed_y
endif
if (objects[i].speed_x!=0.0) or (objects[i].speed_y!=0.0) then
if n_z-(c_z+fh)<objects[i].size then
call SetUnitX(u,new_x)
call SetUnitY(u,new_y)
else
set at2s = Atan2(objects[i].speed_y,objects[i].speed_x)
set vec_sp = SquareRoot(objects[i].speed_x*objects[i].speed_x+objects[i].speed_y*objects[i].speed_y)
set objects[i].speed_x = vec_sp*(Cos(at2s))*ex_rev
set objects[i].speed_y = vec_sp*(Sin(at2s))*ex_rev
call SetUnitX(u,new_x)
call SetUnitY(u,new_y)
set n_z = GetCoordZ(new_x,new_y)
if n_z>c_z then
set objects[i].t_imp = n_z-c_z
endif
endif
endif
if objects[i].func_full_stop!="" then
if (objects[i].speed_z==0.0) and (objects[i].speed_x==0.0) and (objects[i].speed_y==0.0) then
set lastRegisterPhysX = objects[i]
call ExecuteFunc(objects[i].func_full_stop)
endif
endif
if (objects[i].contact_units) or (objects[i].func_contact_unit!="") then
call GroupEnumUnitsInRange(cont_pick,GetUnitX(objects[i].owner),GetUnitY(objects[i].owner),objects[i].size*2.0,null)
call GroupRemoveUnit(cont_pick,objects[i].owner)
set f = FirstOfGroup(cont_pick)
loop
exitwhen(f==null)
set c_z = GetUnitZ(objects[i].owner)
set n_z = GetUnitZ(f)
if (c_z+objects[i].size>n_z) and (c_z-objects[i].size<n_z+150) then
if objects[i].contact_units then
set at2s = Atan2(new_y-GetUnitY(f),new_x-GetUnitX(f))
set vec_sp = SquareRoot(objects[i].speed_x*objects[i].speed_x+objects[i].speed_y*objects[i].speed_y)
set objects[i].speed_x = vec_sp*Cos(at2s)*ex_rev
set objects[i].speed_y = vec_sp*Sin(at2s)*ex_rev
endif
if objects[i].func_contact_unit!="" then
set lastRegisterPhysX = objects[i]
set lastRegisterContactUnit = f
call ExecuteFunc(objects[i].func_contact_unit)
endif
set f = null
else
call GroupRemoveUnit(cont_pick,f)
set f = FirstOfGroup(cont_pick)
endif
endloop
call GroupClear(cont_pick)
endif
endfunction
private function Engine takes nothing returns nothing
call ForGroup(owners1,function EnumObjects)
endfunction
private function Engine2 takes nothing returns nothing
call ForGroup(owners2,function EnumObjects)
endfunction
private function TurnObjects takes nothing returns nothing
set u = GetEnumUnit()
set i = GetPhysXIdByUnit(u)
if objects[i].speed_x*objects[i].speed_x+objects[i].speed_y*objects[i].speed_y>0.25 then
call SetUnitFacing(u, Atan2(objects[i].speed_y*10,objects[i].speed_x*10)*bj_RADTODEG)
if objects[i].speed_z*objects[i].speed_z>0.25 then
call SetUnitLookAt(u, t_bone, u, objects[i].speed_x*10, objects[i].speed_y*10, objects[i].speed_z*10)
else
call ResetUnitLookAt(u)
endif
endif
endfunction
private function Engine3 takes nothing returns nothing
call ForGroup(owners1,function TurnObjects)
call ForGroup(owners2,function TurnObjects)
endfunction
private function ExTm takes nothing returns nothing
call TimerStart(GetExpiredTimer(),fps,true,function Engine2)
endfunction
private function Init takes nothing returns nothing
set i = 0
set mainTimer = CreateTimer()
set owners1 = CreateGroup()
set owners2 = CreateGroup()
set cont_pick = CreateGroup()
set getZloc = Location(0.0,0.0)
set hash = InitHashtable()
set sth = StringHash("ids")
call SetOption.globalTimer(globalTimer)
call SetOption.G(G)
call SetOption.mu(mu)
call SetOption.xi(xi)
call SetOption.rev(rev)
set sep = false
set map_minx = GetRectMinX(bj_mapInitialPlayableArea)
set map_miny = GetRectMinY(bj_mapInitialPlayableArea)
set map_maxx = GetRectMaxX(bj_mapInitialPlayableArea)
set map_maxy = GetRectMaxY(bj_mapInitialPlayableArea)
call TimerStart(mainTimer,fps,true,function Engine)
call TimerStart(CreateTimer(),fps/2,false,function ExTm)
call TimerStart(CreateTimer(),0.1,true,function Engine3)
endfunction
endlibrary
//END
library PDebugger initializer Init
globals
private location loc
private integer init_h
private string str
endglobals
private function Debug takes nothing returns nothing
set loc = Location(0.0,0.0)
call ClearTextMessages()
call DisplayTextToPlayer(GetLocalPlayer(),0,0,str+I2S(GetHandleId(loc)-init_h))
call RemoveLocation(loc)
endfunction
private function Init takes nothing returns nothing
set str = "DEBUG: "
set loc = Location(0.0,0.0)
set init_h = GetHandleId(loc)
call RemoveLocation(loc)
call TimerStart(CreateTimer(),0.5,true,function Debug)
endfunction
endlibrary
Функции библиотеки ниже:
//! Описание функций библиотеки PhysX (конструкция от 1.3)
//! Работа с PhysXObject:
//! *Метка - строка для хранения доп.информации (например, для функции RemoveAllByMark).
/*
PhysXObject.Add(u,speedX,speedY,speedZ,size,contUnits,mrk) - добавляет PhysXObject юниту
u - юнит
speedX - начальная скорость по x
speedY - начальная скорость по y
speedZ - начальная скорость по z
size - размер объекта (радиус контакта)
contUnits - true, объект будет физически контактировать с юнитами; false, проходить насквозь; событие контакта работает в любом случае
mrk - метка
PhysXObject.AddByPolar(u,speed,angXY,AngZ,size,contUnits,mrk) - добавляет PhysXObject юниту (упрощённый вариант)
u - юнит
speed - начальная скорость объекта
angXY - начальный угол движения по XY (в радианах)
angZ - начальный угол движения по Z (в радианах)
size - размер объекта (радиус контакта)
contUnits - true, объект будет физически контактировать с юнитами; false, проходить насквозь; событие контакта работает в любом случае
mrk - метка
PhysXObject.Create(id,player,x,y,turn,fly,speedX,speedY,speedZ,size,contUnits,unsel,inv,mrk) - создаёт юнита с PhysXObject
id - тип создаваемого юнита
player - для какого игрока создать юнита
x - начальное положение юнита по X
y - начальное положение юнита по Y
turn - начальный поворот (facing) юнита
fly - начальная высота полёта юнита
speedX - начальная скорость по x
speedY - начальная скорость по y
speedZ - начальная скорость по z
size - размер объекта (радиус контакта)
contUnits - true, объект будет физически контактировать с юнитами; false, проходить насквозь; событие контакта работает в любом случае
unsel - сделать юнита невыделяемым
inv - сделать юнита бессмертным
mrk - метка
PhysXObject.CreateByPolar(id,player,x,y,turn,fly,speed,angXY,AngZ,size,contUnits,unsel,inv,mrk) - создаёт юнита с PhysXObject (упрощённый вариант)
id - тип создаваемого юнита
player - для какого игрока создать юнита
x - начальное положение юнита по X
y - начальное положение юнита по Y
turn - начальный поворот (facing) юнита
speed - начальная скорость объекта
angXY - начальный угол движения по XY (в радианах)
angZ - начальный угол движения по Z (в радианах)
size - размер объекта (радиус контакта)
contUnits - true, объект будет физически контактировать с юнитами; false, проходить насквозь; событие контакта работает в любом случае
unsel - сделать юнита невыделяемым
inv - сделать юнита бессмертным
mrk - метка
p.Remove() - удаляет PhysXObject, не затрагивая юнита
p - переменная типа PhysXObject
PhysXObject.RemoveByUnit(u) - удаляет PhysXObject по принадлежности к юниту, не затрагивая юнита
u - юнит
p.Destroy() - удаляет PhysXObject вместе с юнитом
p - переменная типа PhysXObject
PhysXObject.DestroyByUnit(u) - удаляет PhysXObject по принадлежности к юниту вместе с юнитом
u - юнит
PhysXObject.RemoveAllByMark(mrk) - удаляет все PhysXObject с заданной маркой, не затрагивая юнита
mrk - марка
PhysXObject.DestroyAllByMark(mrk) - удаляет все PhysXObject с заданной маркой вместе с юнитом
mrk - марка
PhysXObject.RemoveAllOfTypeId(id) - удаляет все PhysXObject, прикреплённые к юниту заданного типа, не затрагивая юнита
id - тип юнита
PhysXObject.DestroyAllOfTypeId(id) - удаляет все PhysXObject, прикреплённые к юниту заданного типа вместе с юнитом
id - тип юнита
PhysXObject.RemoveAll() - удаляет все PhysXObject, не затрагивая юнитов
PhysXObject.DestroyAll() - удаляет все PhysXObject вместе с юнитами
p.InstantEffect(s) - создаёт эффект в позиции объекта, после проигрывания эффект удаляется
s - путь к эффекту (string)
*/
//! События:
//! *На объект можно зарегистрировать по 1 событию каждого типа.
//! *Повторная регистрация события заменяет предыдущую.
//! *Для отмены события, нужно его вызвать с пустой строкой ("").
//! *Внимание! При попытке вызова несуществующей функции будет фатал!
/*
p.RegisterContactUnit(s) - при контакте с другим юнитом вызывает функцию с заданным именем
s - имя функции (string)
p - переменная типа PhysXObject
p.RegisterContactGround(s,once) - при контакте с землёй вызывает функцию с заданным именем
s - имя функции (string)
p - переменная типа PhysXObject
once - определяет, нужно ли регистрировать событие как удар (пример: если true, катящийся объект не будет вызывать событие, а ударившийся будет вызывать в любом случае)
p.SetContactGroundOnce(once) - модификатор для события контакта с землёй (для изменения без переназначения)
once - определяет, нужно ли регистрировать событие как удар (пример: если true, катящийся объект не будет вызывать событие, а ударившийся будет вызывать в любом случае)
p.RegisterFullStop(s) - при полной остановке на месте вызывает функцию с заданным именем
s - имя функции (string)
p - переменная типа PhysXObject
*/
//! Переменные:
/*
lastCreatedPhysX - содержит последний созданный PhysXObject
lastRegisterPhysX - содержит последний среагировавший на событие PhysXObject
lastRegisterContactUnit - содержит последний юнит, с которым контактировал PhysXObject
*/
//! Содержимое PhysXObject:
/*
p.speed_x - текущая скорость по x
p.speed_y - текущая скорость по y
p.speed_z - текущая скорость по z
p.size - размер
p.mrk - метка
(где p - переменная типа PhysXObject)
*/
//! Изменение настроек во время игры:
/*
SetOption.globalTimer(r) - устанавливает глобальный таймер (изменение не влияет на скорости объектов)
r - real
SetOption.G(r) - устанавливает константу G
r - real
SetOption.rev(r) - устанавливает силу противодействия
r - real
SetOption.mu(r) - устанавливает коэффициент трения об землю
r - real
SetOption.xi(r) - устанавливает коэффициент трения воздуха
r - real
*/
//! Прочее:
/*
GetUnitZ(u) - возвращает абсолютную высоту юнита
u - юнит
*/
Где я накосячил?
Принятый ответ
Всё, разобрался, вопрос снимаю)
0
Naadir
7 лет назад
0
Всё, разобрался, вопрос снимаю)
Принятый ответ
1
MpW
7 лет назад
1
там у близзардской глобалки должен быть суффикс ugd_ (например: udg_localunit)
Чтобы оставить комментарий, пожалуйста, войдите на сайт.