fix: 修复CodeQL检测到的代码问题
This commit is contained in:
@@ -91,8 +91,9 @@ export class KinematicCharacterController {
|
||||
*/
|
||||
public setUp(vector: Vector) {
|
||||
let rawVect = VectorOps.intoRaw(vector);
|
||||
return this.raw.setUp(rawVect);
|
||||
const result = this.raw.setUp(rawVect);
|
||||
rawVect.free();
|
||||
return result;
|
||||
}
|
||||
|
||||
public applyImpulsesToDynamicBodies(): boolean {
|
||||
|
||||
@@ -28,6 +28,9 @@ export class DynamicRayCastVehicleController {
|
||||
bodies: RigidBodySet,
|
||||
colliders: ColliderSet,
|
||||
) {
|
||||
if (typeof RawDynamicRayCastVehicleController === 'undefined') {
|
||||
throw new Error('DynamicRayCastVehicleController is not available in 2D mode');
|
||||
}
|
||||
this.raw = new RawDynamicRayCastVehicleController(chassis.handle);
|
||||
this.broadPhase = broadPhase;
|
||||
this.narrowPhase = narrowPhase;
|
||||
|
||||
Reference in New Issue
Block a user